Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #10867: make the makemessages command ignore files and …

…only process directories. Thanks, diegobz. Backport of [10833] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 19e2585a3859475503199ad018688678a1cb3d0f 1 parent 10637a9
Jacob Kaplan-Moss authored May 20, 2009
6  django/core/management/commands/makemessages.py
... ...
@@ -1,6 +1,7 @@
1 1
 import re
2 2
 import os
3 3
 import sys
  4
+import glob
4 5
 import warnings
5 6
 from itertools import dropwhile
6 7
 from optparse import make_option
@@ -95,8 +96,9 @@ def make_messages(locale=None, domain='django', verbosity='1', all=False, extens
95 96
     if locale is not None:
96 97
         languages.append(locale)
97 98
     elif all:
98  
-        languages = [el for el in os.listdir(localedir) if not el.startswith('.')]
99  
-
  99
+        locale_dirs = filter(os.path.isdir, glob.glob('%s/*' % localedir)) 
  100
+        languages = [os.path.basename(l) for l in locale_dirs]
  101
+    
100 102
     for locale in languages:
101 103
         if verbosity > 0:
102 104
             print "processing language", locale

0 notes on commit 19e2585

Please sign in to comment.
Something went wrong with that request. Please try again.