From dffcc5e97988d92b2b8a3bba23a49bcb3cf5d040 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 11 Nov 2013 11:49:48 +0100 Subject: [PATCH] Fixed #20990 -- Ensured unicode paths in compilemessages Thanks Gregoire Astruc for the report and furins for the review. --- django/core/management/commands/compilemessages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/management/commands/compilemessages.py b/django/core/management/commands/compilemessages.py index 931d9948e1..85a713cb45 100644 --- a/django/core/management/commands/compilemessages.py +++ b/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)))