From 3e71f6544feca490211e88db4f449dfdb7acce39 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 14 Jul 2016 18:24:40 +0200 Subject: Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names Thanks Tim Graham for the review. --- django/core/management/commands/makemessages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index c0f9d58f9d..8e00c51dc3 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -549,7 +549,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) -- cgit v1.3