Maintenance - Mise à jour mensuelle Lundi 1 Juin 2020 entre 7h00 et 9h00

Commit 57a92ec2 authored by Jerome Mariette's avatar Jerome Mariette

when checking if executable is present, check if it's a file instead of just existing

parent 1b6569ce
......@@ -199,7 +199,7 @@ def find_executable(executable, find_dirs=None):
with the current directory. To search in additional directories, specify
them in `find_dirs`.
"""
if os.path.exists(executable):
if os.path.isfile(executable):
return os.path.abspath(executable)
find_dirs = parse_string_list(find_dirs)
......@@ -208,7 +208,7 @@ def find_executable(executable, find_dirs=None):
for dir_path in find_dirs:
exe_path = os.path.join(dir_path, executable)
if os.path.exists(exe_path):
if os.path.isfile(exe_path):
return exe_path
raise WeaverError(D_UTIL,
......
......@@ -8,3 +8,11 @@
---
> number = file_prefix + template.format(self.folder_number, self.file_number)
> args = [c for c in number[len(file_prefix):self.depth+len(file_prefix)]] + [number]
202c202
< if os.path.exists(executable):
---
> if os.path.isfile(executable):
211c211
< if os.path.exists(exe_path):
---
> if os.path.isfile(exe_path):
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment