mirror of https://github.com/django/django.git
[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:
|
if ignore_patterns is None:
|
||||||
ignore_patterns = []
|
ignore_patterns = []
|
||||||
dir_suffix = '%s*' % os.sep
|
dir_suffix = '%s*' % os.sep
|
||||||
norm_patterns = map(lambda p: p.endswith(dir_suffix)
|
norm_patterns = [p[:-len(dir_suffix)] if p.endswith(dir_suffix) else p for p in ignore_patterns]
|
||||||
and p[:-len(dir_suffix)] or p, ignore_patterns)
|
|
||||||
for dirpath, dirnames, filenames in os.walk(root, topdown, onerror):
|
for dirpath, dirnames, filenames in os.walk(root, topdown, onerror):
|
||||||
remove_dirs = []
|
remove_dirs = []
|
||||||
for dirname in dirnames:
|
for dirname in dirnames:
|
||||||
|
|
Loading…
Reference in New Issue