1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

added syntax check if no token opt is set

This commit is contained in:
Marco Strigl 2017-02-27 14:07:42 +01:00
parent 8efcb0b14d
commit d49c741b0d

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)