Code

Ticket #19942: 19942-1.diff

File 19942-1.diff, 780 bytes (added by claudep, 16 months ago)
Line 
1diff --git a/django/core/management/utils.py b/django/core/management/utils.py
2index 769f972..d6d0e41 100644
3--- a/django/core/management/utils.py
4+++ b/django/core/management/utils.py
5@@ -1,6 +1,8 @@
6 import os
7 from subprocess import PIPE, Popen
8 
9+from django.utils.encoding import force_text, DEFAULT_LOCALE_ENCODING
10+
11 
12 def popen_wrapper(args):
13     """
14@@ -11,7 +13,7 @@ def popen_wrapper(args):
15     p = Popen(args, shell=False, stdout=PIPE, stderr=PIPE,
16               close_fds=os.name != 'nt', universal_newlines=True)
17     output, errors = p.communicate()
18-    return output, errors, p.returncode
19+    return output, force_text(errors, DEFAULT_LOCALE_ENCODING, strings_only=True), p.returncode
20 
21 def handle_extensions(extensions=('html',), ignored=('py',)):
22     """