From 83795f936bd34d144d8295db0b8ae7f9cf59bfb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Mon, 29 Aug 2022 09:30:37 -0700 Subject: [PATCH] commands: fix ExtensionCommandError constructor calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are missing 'hint' kwargs in some cases when providing hints. Signed-off-by: Martí Bolívar --- src/west/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/west/commands.py b/src/west/commands.py index 87a0134..456f986 100644 --- a/src/west/commands.py +++ b/src/west/commands.py @@ -407,7 +407,7 @@ def _ext_specs(project): # outside of the project. if escapes_directory(spec_file, project.abspath): raise ExtensionCommandError( - f'west-commands file {cmd} ' + hint=f'west-commands file {cmd} ' f'escapes project path {project.path}') # The project may not be cloned yet, or this might be coming @@ -439,7 +439,7 @@ def _ext_specs_from_desc(project, commands_desc): # Verify the YAML's python file doesn't escape the project directory. if escapes_directory(py_file, project.abspath): raise ExtensionCommandError( - f'extension command python file "{commands_desc["file"]}" ' + hint=f'extension command python file "{commands_desc["file"]}" ' f'escapes project path {project.path}') # Create the command thunks.