Fix error when called without args.

This commit is contained in:
Darko Poljak 2016-04-03 21:58:19 +02:00
parent 525e8fbb93
commit a5249a5f02

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)