1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +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:
if opts.set_bugowner:
for role in roles:
try:
setBugowner(apiurl, prj, pac, opts.set_bugowner)
except HTTPError as e:
if e.code == 403:
print("No write permission in" + result.get('project'), end=' ')
if result.get('package'):
print("/", result.get('package'), end=' ')
print()
repl = raw_input('\nCreating a request instead? (y/n) ')
if repl.lower() == 'y':
opts.set_bugowner_request = opts.set_bugowner
opts.set_bugowner = None
break
try:
setBugowner(apiurl, prj, pac, opts.set_bugowner)
except HTTPError as e:
if e.code == 403:
print("No write permission in" + result.get('project'), end=' ')
if result.get('package'):
print("/", result.get('package'), end=' ')
print()
repl = raw_input('\nCreating a request instead? (y/n) ')
if repl.lower() == 'y':
opts.set_bugowner_request = opts.set_bugowner
opts.set_bugowner = None
if opts.set_bugowner_request:
for role in roles:
args = [bugowner, prj]
if pac:
args = args + [pac]
requestactionsxml += self._set_bugowner(args, opts)
args = [bugowner, prj]
if pac:
args = args + [pac]
requestactionsxml += self._set_bugowner(args, opts)
if requestactionsxml != "":
if opts.message: