Skip to content
Snippets Groups Projects
Verified Commit 7247961a authored by Davide Gardenal's avatar Davide Gardenal
Browse files

upgrade_oniro: add function to parse the manifest


WIth get_manifest_projects we can now get a list of
dicts containg all the properties of Oniro's projects
used by repo.

Signed-off-by: Davide Gardenal's avatarDavide Gardenal <davide.gardenal@huawei.com>
parent e2e820fa
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc. # SPDX-FileCopyrightText: Huawei Inc.
# #
# SPDX-License-Identifier: Apache-2.0 # 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")]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment