Print help when invoked with no arguments
This commit is contained in:
parent
bf359c7fc4
commit
90b30b618b
1 changed files with 4 additions and 1 deletions
|
@ -374,7 +374,10 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
config = ConfigFile(args.file)
|
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:
|
if args.symbol in config:
|
||||||
value = config[args.symbol]
|
value = config[args.symbol]
|
||||||
if value:
|
if value:
|
||||||
|
|
Loading…
Reference in a new issue