diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-18 11:55:36 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-18 11:55:36 +0200 |
| commit | 16ab519f62f4418a8cff143ea92e642ae89bb2cf (patch) | |
| tree | 3d9c0c501c19eea38e8d73016bf1fe767fa56eb9 | |
| parent | 85e7a5e140104e7402ba51c313c9e53cb60d96f2 (diff) | |
[py3] Removed gratuitous use of map/lambda
that causes a test failure on Python 3 because map returns an iterator.
| -rw-r--r-- | django/core/management/commands/makemessages.py | 3 |
1 files changed, 1 insertions, 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: |
