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

- do_maintainer: do not set bugowner/create bugowner request action twice

This commit is contained in:
Marcus Huewe 2014-05-08 15:41:15 +02:00
parent 47af622031
commit 87fc39fee4

View File

@ -7200,27 +7200,24 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else: else:
if opts.set_bugowner: if opts.set_bugowner:
for role in roles: try:
try: setBugowner(apiurl, prj, pac, opts.set_bugowner)
setBugowner(apiurl, prj, pac, opts.set_bugowner) except HTTPError as e:
except HTTPError as e: if e.code == 403:
if e.code == 403: print("No write permission in" + result.get('project'), end=' ')
print("No write permission in" + result.get('project'), end=' ') if result.get('package'):
if result.get('package'): print("/", result.get('package'), end=' ')
print("/", result.get('package'), end=' ') print()
print() repl = raw_input('\nCreating a request instead? (y/n) ')
repl = raw_input('\nCreating a request instead? (y/n) ') if repl.lower() == 'y':
if repl.lower() == 'y': opts.set_bugowner_request = opts.set_bugowner
opts.set_bugowner_request = opts.set_bugowner opts.set_bugowner = None
opts.set_bugowner = None
break
if opts.set_bugowner_request: if opts.set_bugowner_request:
for role in roles: args = [bugowner, prj]
args = [bugowner, prj] if pac:
if pac: args = args + [pac]
args = args + [pac] requestactionsxml += self._set_bugowner(args, opts)
requestactionsxml += self._set_bugowner(args, opts)
if requestactionsxml != "": if requestactionsxml != "":
if opts.message: if opts.message: