mirror of
https://github.com/django/django.git
synced 2024-12-26 02:56:25 +00:00
[py3] Removed gratuitous use of map/lambda
that causes a test failure on Python 3 because map returns an iterator.
This commit is contained in:
parent
85e7a5e140
commit
16ab519f62
@ -55,8 +55,7 @@ def walk(root, topdown=True, onerror=None, followlinks=False,
|
||||
if ignore_patterns is None:
|
||||
ignore_patterns = []
|
||||
dir_suffix = '%s*' % os.sep
|
||||
norm_patterns = map(lambda p: p.endswith(dir_suffix)
|
||||
and p[:-len(dir_suffix)] or p, ignore_patterns)
|
||||
norm_patterns = [p[:-len(dir_suffix)] if p.endswith(dir_suffix) else p for p in ignore_patterns]
|
||||
for dirpath, dirnames, filenames in os.walk(root, topdown, onerror):
|
||||
remove_dirs = []
|
||||
for dirname in dirnames:
|
||||
|
Loading…
Reference in New Issue
Block a user