From 90b30b618b8c8ae56f9d5a9ee2e219b1b359f4e8 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sun, 28 Jul 2019 00:36:53 +0200 Subject: [PATCH] Print help when invoked with no arguments --- scripts/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/config.py b/scripts/config.py index 9fe2e516a..cf347e96f 100755 --- a/scripts/config.py +++ b/scripts/config.py @@ -374,7 +374,10 @@ if __name__ == '__main__': args = parser.parse_args() config = ConfigFile(args.file) - if args.command == 'get': + if args.command is None: + parser.print_help() + return 1 + elif args.command == 'get': if args.symbol in config: value = config[args.symbol] if value: