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) log.debug(args)
try: try:
args.func(args) if hasattr(args, "func"):
args.func(args)
else:
parser['main'].print_help()
except ctt.Error as e: except ctt.Error as e:
log.error(e) log.error(e)
sys.exit(1) sys.exit(1)