1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-02 09:46:16 +01:00

- fallback to set_bugowner request when writing to specified container is not permitted

This commit is contained in:
Adrian Schröter 2013-02-21 12:10:02 +01:00
parent 14f6986331
commit 3e88c3ce32

View File

@ -6889,7 +6889,26 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
for role in roles:
try:
setBugowner(apiurl, prj, pac, opts.delete, role)
except urllib2.HTTPError, e:
if e.code == 403:
print "No write permission in", result.get('project'),
if result.get('package'):
print "/", result.get('package'),
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
if opts.set_bugowner_request:
for role in roles:
args = [bugowner, prj]
if pac:
args = args + [pac]
requestactionsxml += self._set_bugowner(args,opts)
if requestactionsxml != "":
message = edit_message()