1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-12 23:56:13 +01:00

Merge branch 'token_syntax_verify' of https://github.com/lethliel/osc

Bail in some cases if wrong args were supplied
This commit is contained in:
Marcus Huewe 2017-03-02 10:37:58 +01:00
commit e324a36b41

View File

@ -725,6 +725,8 @@ class Osc(cmdln.Cmdln):
fd = urlopen(req, data=None)
print(fd.read())
else:
if args and args[0] in ['create', 'delete', 'trigger']:
raise oscerr.WrongArgs("Did you mean --" + args[0] + "?")
# just list token
for data in streamfile(url, http_GET):
sys.stdout.write(data)