Fixed #20990 -- Ensured unicode paths in compilemessages

Thanks Gregoire Astruc for the report and furins for the review.
This commit is contained in:
Claude Paroz 2013-11-11 11:49:48 +01:00
parent 2397daab4a
commit dffcc5e979
1 changed files with 2 additions and 2 deletions

View File

@ -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)))