mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +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:
parent
cb534d09b6
commit
4bc6c34ae3
12
osc/core.py
12
osc/core.py
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user