From a5249a5f02082036d018b2f9649f015926c19507 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sun, 3 Apr 2016 21:58:19 +0200 Subject: [PATCH] Fix error when called without args. --- scripts/ctt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ctt b/scripts/ctt index b23dcc1..8dd8292 100755 --- a/scripts/ctt +++ b/scripts/ctt @@ -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)