Fix Codacy check redefined-argument-from-local

This commit is contained in:
Joseph Barker 2020-08-28 10:37:20 +09:00
parent 459e573019
commit f23510a4fc
No known key found for this signature in database
GPG Key ID: A42D72998CB33917

View File

@ -20,8 +20,8 @@ else:
else:
search_paths = os.defpath.split(os.pathsep)
for path in search_paths:
filepath = os.path.join(path, file)
for p in search_paths:
filepath = os.path.join(p, file)
if os.path.exists(filepath) and os.access(filepath, mode):
return filepath
return None