diff options
Diffstat (limited to 'lib/python/qmk/cli/info.py')
-rwxr-xr-x | lib/python/qmk/cli/info.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py index 5e4b39141..0e64d4074 100755 --- a/lib/python/qmk/cli/info.py +++ b/lib/python/qmk/cli/info.py | |||
@@ -134,11 +134,11 @@ def info(cli): | |||
134 | if not cli.config.info.keyboard: | 134 | if not cli.config.info.keyboard: |
135 | cli.log.error('Missing paramater: --keyboard') | 135 | cli.log.error('Missing paramater: --keyboard') |
136 | cli.subcommands['info'].print_help() | 136 | cli.subcommands['info'].print_help() |
137 | exit(1) | 137 | return False |
138 | 138 | ||
139 | if not is_keyboard(cli.config.info.keyboard): | 139 | if not is_keyboard(cli.config.info.keyboard): |
140 | cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard) | 140 | cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard) |
141 | exit(1) | 141 | return False |
142 | 142 | ||
143 | # Build the info.json file | 143 | # Build the info.json file |
144 | kb_info_json = info_json(cli.config.info.keyboard) | 144 | kb_info_json = info_json(cli.config.info.keyboard) |
@@ -146,13 +146,10 @@ def info(cli): | |||
146 | # Output in the requested format | 146 | # Output in the requested format |
147 | if cli.args.format == 'json': | 147 | if cli.args.format == 'json': |
148 | print(json.dumps(kb_info_json)) | 148 | print(json.dumps(kb_info_json)) |
149 | exit() | 149 | elif cli.args.format == 'text': |
150 | |||
151 | if cli.args.format == 'text': | ||
152 | print_text_output(kb_info_json) | 150 | print_text_output(kb_info_json) |
153 | |||
154 | elif cli.args.format == 'friendly': | 151 | elif cli.args.format == 'friendly': |
155 | print_friendly_output(kb_info_json) | 152 | print_friendly_output(kb_info_json) |
156 | |||
157 | else: | 153 | else: |
158 | cli.log.error('Unknown format: %s', cli.args.format) | 154 | cli.log.error('Unknown format: %s', cli.args.format) |
155 | return False | ||