summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-15 18:59:39 -0500
committerTim Graham <timograham@gmail.com>2015-02-17 08:08:28 -0500
commit9dba901d9c44a117b35003e0c239476536c259aa (patch)
tree103a17b56f07cff5f351d99b51ce2596297ac42a
parentb2f7daa4a6ba4f463dd79b19c337c738201479ad (diff)
[1.8.x] Refs #24324 -- Fixed makemessages crash when Django is installed in a non-ASCII path.
Backport of 81a94cc616ab80decaa495cfa1c0c623527fc0e7 from master
-rw-r--r--django/core/management/commands/makemessages.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index 48608feb9b..2afbc8949c 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -16,6 +16,7 @@ from django.core.management.utils import (
find_command, handle_extensions, popen_wrapper,
)
from django.utils import six
+from django.utils._os import upath
from django.utils.encoding import force_str
from django.utils.functional import cached_property, total_ordering
from django.utils.jslex import prepare_js_for_gettext
@@ -472,7 +473,7 @@ class Command(BaseCommand):
the msgs string, inserting it at the right place. msgs should be the
contents of a newly created .po file.
"""
- django_dir = os.path.normpath(os.path.join(os.path.dirname(django.__file__)))
+ django_dir = os.path.normpath(os.path.join(os.path.dirname(upath(django.__file__))))
if self.domain == 'djangojs':
domains = ('djangojs', 'django')
else: