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
1 changed files with 4 additions and 2 deletions

View File

@ -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)