diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-29 13:05:22 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-29 20:49:25 +0200 |
| commit | c2fcba2ac76cdaed5ccf07ae0521a78feb598825 (patch) | |
| tree | 33a25be06b1072feb27b9b64b8c1fb3f71ef5ab3 /django/utils | |
| parent | dfa712efb8b90c953d850136804ca970fa25b2a5 (diff) | |
Ensured gen_filenames() yields native strings.
This also fixes a test failure on Python 2 when Django is installed in a
non-ASCII path. This problem cannot happen on Python 3.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/autoreload.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index ad4b0db6fb..c4b12241f0 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -37,6 +37,7 @@ import traceback from django.apps import apps from django.conf import settings from django.core.signals import request_finished +from django.utils._os import npath from django.utils.six.moves import _thread as thread # This import does nothing, but it's necessary to avoid some race conditions @@ -106,7 +107,7 @@ def gen_filenames(only_new=False): 'conf', 'locale'), 'locale'] for app_config in reversed(list(apps.get_app_configs())): - basedirs.append(os.path.join(app_config.path, 'locale')) + basedirs.append(os.path.join(npath(app_config.path), 'locale')) basedirs.extend(settings.LOCALE_PATHS) basedirs = [os.path.abspath(basedir) for basedir in basedirs if os.path.isdir(basedir)] |
