Skip to content

Commit

Permalink
[py3] Removed gratuitous use of map/lambda
Browse files Browse the repository at this point in the history
that causes a test failure on Python 3 because map returns an iterator.
  • Loading branch information
aaugustin committed Aug 18, 2012
1 parent 85e7a5e commit 16ab519
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/core/management/commands/makemessages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 16ab519

Please sign in to comment.