diff options
author | Simon Glass <sjg@chromium.org> | 2022-02-11 13:23:18 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-02 10:28:12 -0500 |
commit | 32cc6ae273128510cffc536fc72f260181ef1744 (patch) | |
tree | f83965c262417db03c0ef725582f7bdfc5f1aa3b /tools/patman/tools.py | |
parent | f9a719e2954473f9be1f8c14a28288f943a00dd2 (diff) |
patman: Correct pylint errors
Fix pylint errors that can be fixed and mask those that seem to be
incorrect.
Signed-off-by: Simon Glass <sjg@chromium.org>
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 5e4d4ac05c..2ac814d476 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 |