mirror of https://github.com/django/django.git
Made a couple of idiomatic changes in makemessages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2894ec71c9
commit
9b762d170a
|
@ -46,10 +46,12 @@ def _popen(cmd):
|
||||||
return p.communicate()
|
return p.communicate()
|
||||||
|
|
||||||
def walk(root, topdown=True, onerror=None, followlinks=False,
|
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
|
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
|
dir_suffix = '%s*' % os.sep
|
||||||
norm_patterns = map(lambda p: p.endswith(dir_suffix)
|
norm_patterns = map(lambda p: p.endswith(dir_suffix)
|
||||||
and p[:-len(dir_suffix)] or p, ignore_patterns)
|
and p[:-len(dir_suffix)] or p, ignore_patterns)
|
||||||
|
@ -391,9 +393,10 @@ class Command(NoArgsCommand):
|
||||||
no_location = options.get('no_location')
|
no_location = options.get('no_location')
|
||||||
no_obsolete = options.get('no_obsolete')
|
no_obsolete = options.get('no_obsolete')
|
||||||
if domain == 'djangojs':
|
if domain == 'djangojs':
|
||||||
extensions = handle_extensions(extensions or ['js'])
|
exts = extensions if extensions else ['js']
|
||||||
else:
|
else:
|
||||||
extensions = handle_extensions(extensions or ['html', 'txt'])
|
exts = extensions if extensions else ['html', 'txt']
|
||||||
|
extensions = handle_extensions(exts)
|
||||||
|
|
||||||
if verbosity > 1:
|
if verbosity > 1:
|
||||||
self.stdout.write('examining files with the extensions: %s\n'
|
self.stdout.write('examining files with the extensions: %s\n'
|
||||||
|
|
Loading…
Reference in New Issue