Skip to content

Commit

Permalink
Merge branch 'token_syntax_verify' of https://github.com/lethliel/osc
Browse files Browse the repository at this point in the history
Bail in some cases if wrong args were supplied
  • Loading branch information
marcus-h committed Mar 2, 2017
2 parents cf656e3 + d49c741 commit e324a36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ def do_token(self, subcmd, opts, *args):
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)
Expand Down

0 comments on commit e324a36

Please sign in to comment.