diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-07-14 18:24:40 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-07-14 20:39:58 +0200 |
| commit | a74adb4c35a90f41e56bb97166a784e56835a56a (patch) | |
| tree | 3b8d3b091e0bcd5d03cd979d67906da066fbfd61 /django | |
| parent | 5316ae7d4f03ceed268422cc9adcedbba0d6d7f4 (diff) | |
[1.9.x] Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
Backport of 3e71f6544feca490211e88db4f449dfdb7acce39 from master.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/makemessages.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index 0df47d306e..0e75c7e99c 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -511,7 +511,7 @@ class Command(BaseCommand): input_files = [bf.work_path for bf in build_files] with NamedTemporaryFile(mode='w+') as input_files_list: - input_files_list.write('\n'.join(input_files)) + input_files_list.write(force_str('\n'.join(input_files), encoding=DEFAULT_LOCALE_ENCODING)) input_files_list.flush() args.extend(['--files-from', input_files_list.name]) args.extend(self.xgettext_options) |
