Commit a6c4db6c authored by mathieui's avatar mathieui

decorators: fix the case where there is no argument

can’t believe we didn’t hit that before
parent 79461900
...@@ -118,7 +118,10 @@ class CommandArgParser(object): ...@@ -118,7 +118,10 @@ class CommandArgParser(object):
def first(func): def first(func):
def second(self, args, *a, **kw): def second(self, args, *a, **kw):
default_args = defaults default_args = defaults
args = common.shell_split(args) if args and args.strip():
args = common.shell_split(args)
else:
args = []
if len(args) < mandatory: if len(args) < mandatory:
return func(self, None, *a, **kw) return func(self, None, *a, **kw)
res, args = args[:mandatory], args[mandatory:] res, args = args[:mandatory], args[mandatory:]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment