From 579ec4a1404c7eb6d2c0cfb7458b2753bf03beb1 Mon Sep 17 00:00:00 2001 From: Marco RINALDUCCI Date: Fri, 5 Apr 2019 17:15:52 +0200 Subject: [PATCH 1/2] Fixed error when calling app without arguments --- vaultlocker/shell.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vaultlocker/shell.py b/vaultlocker/shell.py index 8d6fa9d..52a5f85 100644 --- a/vaultlocker/shell.py +++ b/vaultlocker/shell.py @@ -201,7 +201,10 @@ def main(): logging.basicConfig(level=logging.DEBUG) try: - args.func(args, get_config()) + if (len( vars(args) ) <= 2): +            parser.print_help() +        else: +            args.func(args, get_config()) except Exception as e: raise SystemExit( '{prog}: {msg}'.format( From c33166ea54a2b2a1e4c158fe2f95470bc8fbc155 Mon Sep 17 00:00:00 2001 From: Marco RINALDUCCI Date: Wed, 10 Apr 2019 16:55:09 +0200 Subject: [PATCH 2/2] Fixed Indentation Error --- vaultlocker/shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vaultlocker/shell.py b/vaultlocker/shell.py index 52a5f85..2689fe9 100644 --- a/vaultlocker/shell.py +++ b/vaultlocker/shell.py @@ -202,9 +202,9 @@ def main(): try: if (len( vars(args) ) <= 2): -            parser.print_help() -        else: -            args.func(args, get_config()) + parser.print_help() + else: + args.func(args, get_config()) except Exception as e: raise SystemExit( '{prog}: {msg}'.format(