Author: ramiro
Date: 2012-02-04 14:12:58 -0800 (Sat, 04 Feb 2012)
New Revision: 17449
Modified:
django/trunk/django/core/management/commands/makemessages.py
Log:
Made a couple of idiomatic changes in makemessages.
Modified: django/trunk/django/core/management/commands/makemessages.py
===================================================================
--- django/trunk/django/core/management/commands/makemessages.py
2012-02-04 21:44:31 UTC (rev 17448)
+++ django/trunk/django/core/management/commands/makemessages.py
2012-02-04 22:12:58 UTC (rev 17449)
@@ -46,10 +46,12 @@
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 @@
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'
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.