west: commands: sign: look for imgtool.py in path
If 'imgtool' is not found in PATH look for 'imgtool.py' before bailing out. This allows adding the mcuboot/scripts directory to PATH and have 'west sign -t imgtool' automatically locate the 'imgtool.py' script. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
8129a78a51
commit
deccb71f1d
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ class ImgtoolSigner(Signer):
|
|||
format(args.tool_path))
|
||||
tool_path = args.tool_path
|
||||
else:
|
||||
tool_path = shutil.which('imgtool')
|
||||
tool_path = shutil.which('imgtool') or shutil.which('imgtool.py')
|
||||
if not tool_path:
|
||||
log.die('imgtool not found; either install it',
|
||||
'(e.g. "pip3 install imgtool") or provide --tool-path')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue