mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +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
|
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 None
|
return node
|
||||||
|
return node.get('project')
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def show_package_disabled_repos(apiurl, prj, pac):
|
def show_package_disabled_repos(apiurl, prj, pac):
|
||||||
|
Loading…
Reference in New Issue
Block a user