diff options
author | Ryan <[email protected]> | 2020-10-07 10:46:10 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-06 16:46:10 -0700 |
commit | 2c9ffd47391b8dec98db94bef9b2f5c14a57cf94 (patch) | |
tree | 57f743159e972e3e2cd215ab256675d3c84d1832 /lib/python/qmk/cli/kle2json.py | |
parent | 2013f6313430b977e557e482d30daa279a46e75d (diff) | |
download | qmk_firmware-2c9ffd47391b8dec98db94bef9b2f5c14a57cf94.tar.gz qmk_firmware-2c9ffd47391b8dec98db94bef9b2f5c14a57cf94.zip |
CLI: update subcommands to use return instead of exit() (#10323)0.10.28
Diffstat (limited to 'lib/python/qmk/cli/kle2json.py')
-rwxr-xr-x | lib/python/qmk/cli/kle2json.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py index 798f95fd19..3d1bb8c43c 100755 --- a/lib/python/qmk/cli/kle2json.py +++ b/lib/python/qmk/cli/kle2json.py @@ -37,7 +37,8 @@ def kle2json(cli): file_path = Path(os.environ['ORIG_CWD'], cli.args.filename) # Check for valid file_path for more graceful failure if not file_path.exists(): - return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) + cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) + return False out_path = file_path.parent raw_code = file_path.open().read() # Check if info.json exists, allow overwrite with force @@ -50,8 +51,7 @@ def kle2json(cli): except Exception as e: cli.log.error('Could not parse KLE raw data: %s', raw_code) cli.log.exception(e) - # FIXME: This should be better - return cli.log.error('Could not parse KLE raw data.') + return False keyboard = OrderedDict( keyboard_name=kle.name, url='', |