mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 18:46:17 +01:00
don't crash on add_role to a project (untested)
This commit is contained in:
parent
7b5471e737
commit
8e92cebaf2
@ -1221,15 +1221,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
user = args[0]
|
||||
role = args[1]
|
||||
project = args[2]
|
||||
actionxml = """ <action type="add_role"> <target project="%s" /> <person name="%s" role="%s" /> </action> """ % \
|
||||
(project, user, role)
|
||||
|
||||
if len(args) > 3:
|
||||
package = args[3]
|
||||
actionxml = """ <action type="add_role"> <target project="%s" package="%s" /> <person name="%s" role="%s" /> </action> """ % \
|
||||
(project, package, user, role)
|
||||
|
||||
if get_user_meta(apiurl, user) == None:
|
||||
raise oscerr.WrongArgs('osc: an error occured.')
|
||||
|
||||
actionxml = """ <action type="add_role"> <target project="%s" package="%s" /> <person name="%s" role="%s" /> </action> """ % \
|
||||
(project, package, user, role)
|
||||
|
||||
return actionxml
|
||||
|
||||
def _set_bugowner(self, args, opts):
|
||||
|
Loading…
Reference in New Issue
Block a user