From 16ab519f62f4418a8cff143ea92e642ae89bb2cf Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 18 Aug 2012 11:55:36 +0200 Subject: [PATCH] [py3] Removed gratuitous use of map/lambda that causes a test failure on Python 3 because map returns an iterator. --- django/core/management/commands/makemessages.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index fc0a78fb2b..7bdd2472d3 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -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: