Renamed 'is_accessible_dir' to 'can_access_dir'

This is to be consistent with the 'can_access' function already present
in the module.
This commit is contained in:
Massimiliano Culpo 2019-01-01 11:25:40 +01:00
parent c2a8b0c373
commit dce6851d37
No known key found for this signature in database
GPG Key ID: D1ADB1014FF1118C

View File

@ -1354,7 +1354,7 @@ def find_libraries(libraries, root, shared=True, recursive=False):
@memoized
def is_accessible_dir(path):
def can_access_dir(path):
"""Returns True if the argument is an accessible directory.
Args:
@ -1379,7 +1379,7 @@ def files_in(*search_paths):
List of (file, full_path) tuples with all the files found.
"""
files = []
for d in filter(is_accessible_dir, search_paths):
for d in filter(can_access_dir, search_paths):
files.extend(filter(
lambda x: os.path.isfile(x[1]),
[(f, os.path.join(d, f)) for f in os.listdir(d)]