瀏覽代碼

Fixed #20990 -- Ensured unicode paths in compilemessages

Thanks Gregoire Astruc for the report and furins for the review.
Claude Paroz 11 年之前
父節點
當前提交
dffcc5e979
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      django/core/management/commands/compilemessages.py

+ 2 - 2
django/core/management/commands/compilemessages.py

@@ -6,7 +6,7 @@ from optparse import make_option
 
 from django.core.management.base import BaseCommand, CommandError
 from django.core.management.utils import find_command, popen_wrapper
-from django.utils._os import npath
+from django.utils._os import npath, upath
 
 
 def has_bom(fn):
@@ -25,7 +25,7 @@ def compile_messages(stdout, locale=None):
     basedirs = [os.path.join('conf', 'locale'), 'locale']
     if os.environ.get('DJANGO_SETTINGS_MODULE'):
         from django.conf import settings
-        basedirs.extend(settings.LOCALE_PATHS)
+        basedirs.extend([upath(path) for path in settings.LOCALE_PATHS])
 
     # Gather existing directories.
     basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))