Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made a couple of idiomatic changes in makemessages.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9b762d170a9d895eadae270569c1dee6dbd976c5 1 parent 2894ec7
@ramiro ramiro authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 django/core/management/commands/makemessages.py
View
9 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 @@ def handle_noargs(self, *args, **options):
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'
Please sign in to comment.
Something went wrong with that request. Please try again.