Simplify how we check if a file is excluded

Our typical usage always passes is_path_excluded which checks the basename and the full path
This commit is contained in:
Ian Cordasco 2016-03-11 21:08:41 -06:00
parent d331558868
commit 4c797c9ff7

View file

@ -117,7 +117,7 @@ def filenames_from(arg, predicate=None):
for root, sub_directories, files in os.walk(arg):
for filename in files:
joined = os.path.join(root, filename)
if predicate(filename) or predicate(joined):
if predicate(joined):
continue
yield joined
# NOTE(sigmavirus24): os.walk() will skip a directory if you