Skip to content
Permalink
Browse files

scripts: fix west TypeError on unknown arguments

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 <marti.bolivar@nordicsemi.no>
  • Loading branch information...
mbolivar authored and carlescufi committed May 15, 2019
1 parent 6cb8e3e commit b3674f596b08a8e791a0c1cbf0ecced3f3e7c6e2
Showing with 1 addition and 2 deletions.
  1. +1 −2 scripts/west_commands/run_common.py
@@ -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)

0 comments on commit b3674f5

Please sign in to comment.
You can’t perform that action at this time.