1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-23 02:32:13 +01:00

- show created incident project

This commit is contained in:
Adrian Schröter 2011-07-19 18:05:07 +02:00
parent e9f5a9361e
commit 02030eb4d9

View File

@ -2546,7 +2546,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
query["noaccess"] = 1
url = makeurl(apiurl, ['source', target_project], query=query)
r = http_POST(url, data=opts.message)
print ET.parse(r).getroot().get('code')
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('error')
@cmdln.option('-a', '--attribute', metavar='ATTRIBUTE',