1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +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,12 +3065,14 @@ def show_attribute_meta(apiurl, prj, pac, subpac, attribute, with_defaults, with
raise
def show_develproject(apiurl, prj, pac):
def show_develproject(apiurl, prj, pac, xml_node=False):
m = show_package_meta(apiurl, prj, pac)
try:
return ET.fromstring(''.join(m)).find('devel').get('project')
except:
return None
node = ET.fromstring(''.join(m)).find('devel')
if not node is None:
if xml_node:
return node
return node.get('project')
return None
def show_package_disabled_repos(apiurl, prj, pac):