trying to remove codeclimate complain
* Sorry, I don't have codeclimate * did little refactoring, hope it helps.
This commit is contained in:
parent
8c12daa407
commit
62150b3030
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ def which(program):
|
||||||
if is_exe(program):
|
if is_exe(program):
|
||||||
return program
|
return program
|
||||||
else:
|
else:
|
||||||
for path in os.environ["PATH"].split(os.pathsep) + ["/sbin", "/usr/sbin/", "/usr/local/sbin"]:
|
localPATH = os.environ["PATH"].split(os.pathsep)
|
||||||
|
localPATH += ["/sbin", "/usr/sbin/", "/usr/local/sbin"]
|
||||||
|
for path in localPATH:
|
||||||
exe_file = os.path.join(path, program)
|
exe_file = os.path.join(path, program)
|
||||||
if is_exe(exe_file):
|
if is_exe(exe_file):
|
||||||
return exe_file
|
return exe_file
|
||||||
|
|
Loading…
Reference in a new issue