diff options
author | Tom Rini <trini@konsulko.com> | 2022-03-02 10:38:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-02 10:38:00 -0500 |
commit | f861ffa660dc47c4017c220b94d10a64439d46a7 (patch) | |
tree | 7ba56091d7713bf04e940afa9a2f8adcaeeb2a16 /tools/patman/tools.py | |
parent | f9a719e2954473f9be1f8c14a28288f943a00dd2 (diff) | |
parent | 642e51addf918e0dd1b901efaa9f5706c12365b7 (diff) |
Merge branch '2022-03-02-enable-pylint-in-CI' into next
To quote the author:
This series adds a new errors-only pylint check and adds it to the CI
systems.
It also fixes the current errors in the U-Boot Python code, disabling
errors where it seems necessary.
A small patch to buildman allows it to build sandbox without any changes
to the default config file
Diffstat (limited to 'tools/patman/tools.py')
-rw-r--r-- | tools/patman/tools.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py index 5e4d4ac05cf..2ac814d476f 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -62,8 +62,8 @@ def prepare_output_dir(dirname, preserve=False): try: os.makedirs(outdir) except OSError as err: - raise CmdError("Cannot make output directory '%s': '%s'" % - (outdir, err.strerror)) + raise ValueError( + f"Cannot make output directory 'outdir': 'err.strerror'") tout.debug("Using output directory '%s'" % outdir) else: outdir = tempfile.mkdtemp(prefix='binman.') @@ -160,7 +160,7 @@ def get_input_filename_glob(pattern): A list of matching files in all input directories """ if not indir: - return glob.glob(fname) + return glob.glob(pattern) files = [] for dirname in indir: pathname = os.path.join(dirname, pattern) @@ -201,7 +201,7 @@ def path_has_file(path_spec, fname): return True return False -def get_host_compile_tool(name): +def get_host_compile_tool(env, name): """Get the host-specific version for a compile tool This checks the environment variables that specify which version of @@ -356,7 +356,7 @@ def run_result(name, *args, **kwargs): name, extra_args = get_target_compile_tool(name) args = tuple(extra_args) + args elif for_host: - name, extra_args = get_host_compile_tool(name) + name, extra_args = get_host_compile_tool(env, name) args = tuple(extra_args) + args name = os.path.expanduser(name) # Expand paths containing ~ all_args = (name,) + args |