1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 10:46:15 +01:00

- show_develproject: added additional "xml_node=False" parameter (if true an Element instance is returned (if devel exists))

This commit is contained in:
Marcus Huewe 2011-03-08 19:44:29 +01:00
parent cb534d09b6
commit 4bc6c34ae3

View File

@ -3065,11 +3065,13 @@ def show_attribute_meta(apiurl, prj, pac, subpac, attribute, with_defaults, with
raise raise
def show_develproject(apiurl, prj, pac): def show_develproject(apiurl, prj, pac, xml_node=False):
m = show_package_meta(apiurl, prj, pac) m = show_package_meta(apiurl, prj, pac)
try: node = ET.fromstring(''.join(m)).find('devel')
return ET.fromstring(''.join(m)).find('devel').get('project') if not node is None:
except: if xml_node:
return node
return node.get('project')
return None return None