mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-11 16:36:14 +01:00
- handle missing or wrong service commands with a valid error
This commit is contained in:
parent
feb731e3c0
commit
38f665eef8
@ -4858,7 +4858,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
project = package = singleservice = mode = None
|
||||
apiurl = self.get_api_url()
|
||||
|
||||
if len(args) < 3:
|
||||
if len(args) < 1:
|
||||
raise oscerr.WrongArgs('No command given.')
|
||||
elif len(args) < 3:
|
||||
if is_package_dir(os.curdir):
|
||||
project = store_read_project(os.curdir)
|
||||
package = store_read_package(os.curdir)
|
||||
@ -4874,6 +4876,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
command = args[0]
|
||||
|
||||
if not (command in ( 'run', 'localrun', 'disabledrun', 'remoterun', 'lr', 'dr', 'r', 'rr' )):
|
||||
raise oscerr.WrongArgs('Wrong command given.')
|
||||
|
||||
if command == "remoterun" or command == "rr":
|
||||
print runservice(apiurl, project, package)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user