Fix error when called without args.
This commit is contained in:
parent
525e8fbb93
commit
a5249a5f02
1 changed files with 4 additions and 2 deletions
|
@ -92,8 +92,10 @@ def parse_argv(argv, version):
|
|||
log.debug(args)
|
||||
|
||||
try:
|
||||
args.func(args)
|
||||
|
||||
if hasattr(args, "func"):
|
||||
args.func(args)
|
||||
else:
|
||||
parser['main'].print_help()
|
||||
except ctt.Error as e:
|
||||
log.error(e)
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Reference in a new issue