1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-24 17:16:12 +01:00

- show created incident project

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

View File

@ -2561,7 +2561,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)
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',