CLI: update subcommands to use return instead of exit() (#10323)
This commit is contained in:
parent
2013f63134
commit
2c9ffd4739
9 changed files with 20 additions and 18 deletions
|
@ -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 == '-':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue