CLI: update subcommands to use return instead of exit() (#10323)

This commit is contained in:
Ryan
2020-10-07 10:46:10 +11:00
committed by Drashna Jael're
parent cce4f22e3a
commit ae5ee61e7b
9 changed files with 21 additions and 19 deletions

View File

@@ -22,12 +22,12 @@ def json2c(cli):
# TODO(skullydazed/anyone): Read file contents from STDIN
cli.log.error('Reading from STDIN is not (yet) supported.')
cli.print_usage()
exit(1)
return False
if not cli.args.filename.exists():
cli.log.error('JSON file does not exist!')
cli.print_usage()
exit(1)
return False
# Environment processing
if cli.args.output and cli.args.output.name == '-':