mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 01:16:14 +01:00
- show created incident project
This commit is contained in:
parent
af253d2eb2
commit
dce5c8b4fc
@ -2561,7 +2561,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
query["noaccess"] = 1
|
query["noaccess"] = 1
|
||||||
url = makeurl(apiurl, ['source', target_project], query=query)
|
url = makeurl(apiurl, ['source', target_project], query=query)
|
||||||
r = http_POST(url, data=opts.message)
|
r = http_POST(url, data=opts.message)
|
||||||
|
project = None
|
||||||
|
for i in ET.fromstring(r.read()).findall('data'):
|
||||||
|
if i.get('name') == 'targetproject':
|
||||||
|
project = i.text.strip()
|
||||||
|
if project:
|
||||||
|
print "Incident project created: ", project
|
||||||
|
else:
|
||||||
print ET.parse(r).getroot().get('code')
|
print ET.parse(r).getroot().get('code')
|
||||||
|
print ET.parse(r).getroot().get('error')
|
||||||
|
|
||||||
|
|
||||||
@cmdln.option('-a', '--attribute', metavar='ATTRIBUTE',
|
@cmdln.option('-a', '--attribute', metavar='ATTRIBUTE',
|
||||||
|
Loading…
Reference in New Issue
Block a user