mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
- give a better hint to the user, when a search role is not defined
This commit is contained in:
parent
d86e28744f
commit
f8a1fa2ebc
@ -7128,7 +7128,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
roles = [ 'bugowner', 'maintainer' ]
|
||||
if len(opts.role):
|
||||
roles = opts.role
|
||||
if opts.bugowner_only or opts.bugowner or subcmd == 'bugowner':
|
||||
elif opts.bugowner_only or opts.bugowner or subcmd == 'bugowner':
|
||||
roles = [ 'bugowner' ]
|
||||
|
||||
args = slash_split(args)
|
||||
@ -7163,7 +7163,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
filterroles = None
|
||||
if binary:
|
||||
searchresult = owner(apiurl, binary, "binary", usefilter=filterroles, devel=None, limit=limit)
|
||||
if not searchresult and (opts.set_bugowner or opts.set_bugowner_request):
|
||||
if searchresult != None and len(searchresult) == 0:
|
||||
# We talk to an OBS 2.4 or later understanding the call
|
||||
if opts.set_bugowner or opts.set_bugowner_request:
|
||||
# filtered search did not succeed, but maybe we want to set an owner initially?
|
||||
searchresult = owner(apiurl, binary, "binary", usefilter="", devel=None, limit=-1)
|
||||
if searchresult:
|
||||
@ -7176,6 +7178,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
repl = raw_input('\nUse this container? (y/n) ')
|
||||
if repl.lower() != 'y':
|
||||
searchresult = None
|
||||
else:
|
||||
print("Empty search result, you may want to search with other or all roles via -r ''")
|
||||
return
|
||||
elif opts.user:
|
||||
searchresult = owner(apiurl, opts.user, "user", usefilter=filterroles, devel=None)
|
||||
elif opts.group:
|
||||
|
Loading…
Reference in New Issue
Block a user