Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
upgrade_oniro_utils.py 524 B
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
# 
# Utils functions for upgrade_oniro.py 


def get_manifest_projects():
    """
    Create a list of dict containing all the properties of the
    projects in Oniro's manifest.

    Returns:
        A new list of dict with all the projects' properties
    """
    import xml.etree.ElementTree as ET

    tree = ET.parse("oniro/manifests/default.xml")
    root = tree.getroot()
    return [project.attrib for project in root.findall("project")]