Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[py3] Removed gratuitous use of map/lambda

that causes a test failure on Python 3 because map returns an iterator.
  • Loading branch information...
commit 16ab519f62f4418a8cff143ea92e642ae89bb2cf 1 parent 85e7a5e
@aaugustin aaugustin authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  django/core/management/commands/
3  django/core/management/commands/
@@ -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:

0 comments on commit 16ab519

Please sign in to comment.
Something went wrong with that request. Please try again.