summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-02-04 22:12:58 +0000
committerRamiro Morales <cramm0@gmail.com>2012-02-04 22:12:58 +0000
commit9b762d170a9d895eadae270569c1dee6dbd976c5 (patch)
treef9f7ab9ac7e993e91d0f31af11417f2301b17907
parent2894ec71c962c7e3cdc69d7ab44a01b142795b38 (diff)
Made a couple of idiomatic changes in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/makemessages.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index 2a814f0708..24d5beaa63 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -46,10 +46,12 @@ def _popen(cmd):
return p.communicate()
def walk(root, topdown=True, onerror=None, followlinks=False,
- ignore_patterns=[], verbosity=0, stdout=sys.stdout):
+ ignore_patterns=None, verbosity=0, stdout=sys.stdout):
"""
A version of os.walk that can follow symlinks for Python < 2.6
"""
+ 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)
@@ -391,9 +393,10 @@ class Command(NoArgsCommand):
no_location = options.get('no_location')
no_obsolete = options.get('no_obsolete')
if domain == 'djangojs':
- extensions = handle_extensions(extensions or ['js'])
+ exts = extensions if extensions else ['js']
else:
- extensions = handle_extensions(extensions or ['html', 'txt'])
+ exts = extensions if extensions else ['html', 'txt']
+ extensions = handle_extensions(exts)
if verbosity > 1:
self.stdout.write('examining files with the extensions: %s\n'