Merge pull request #16 from darko-poljak/no-args-err

Fix error when called without args.
This commit is contained in:
Nico Schottelius 2016-04-03 23:51:39 +02:00
commit bd0c3cc13c

View file

@ -92,8 +92,10 @@ def parse_argv(argv, version):
log.debug(args)
try:
if hasattr(args, "func"):
args.func(args)
else:
parser['main'].print_help()
except ctt.Error as e:
log.error(e)
sys.exit(1)