Skip to content

Commit

Permalink
scripts: fix west TypeError on unknown arguments
Browse files Browse the repository at this point in the history
Let's not mess with CommandContextError here, as the APIs have gotten
messed around a bit in various versions. Just use log.die() as that
will work with current and future west versions, and is clearer anyway.

Fixes west 247.

Signed-off-by: Marti Bolivar <[email protected]>
  • Loading branch information
mbolivar-nordic authored and carlescufi committed May 16, 2019
1 parent 6cb8e3e commit b3674f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/west_commands/run_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ def do_run_common(command, args, runner_args, cached_runner_var):
runner_cls.add_parser(parser)
parsed_args, unknown = parser.parse_known_args(args=final_runner_args)
if unknown:
raise CommandContextError('Runner', runner,
'received unknown arguments', unknown)
log.die('Runner', runner, 'received unknown arguments:', unknown)
runner = runner_cls.create(cfg, parsed_args)
runner.run(command_name)

Expand Down

0 comments on commit b3674f5

Please sign in to comment.