diff options
| author | Zbigniew Siciarz <antyqjon@gmail.com> | 2014-03-26 00:42:19 +0100 |
|---|---|---|
| committer | Zbigniew Siciarz <antyqjon@gmail.com> | 2014-03-26 00:42:19 +0100 |
| commit | 3cdb0baa453e2cc09c0a5c5c04cce66a6dc4e789 (patch) | |
| tree | 27afa6c2babf4825768c4b75432bd112a0e1bff7 | |
| parent | ff874f363ce6556577f03909b15c71c051d5b617 (diff) | |
Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems.
| -rw-r--r-- | django/core/management/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/core/management/utils.py b/django/core/management/utils.py index 92d0964296..895ed69959 100644 --- a/django/core/management/utils.py +++ b/django/core/management/utils.py @@ -20,8 +20,10 @@ def popen_wrapper(args, os_err_exc_type=CommandError): p = Popen(args, shell=False, stdout=PIPE, stderr=PIPE, close_fds=os.name != 'nt', universal_newlines=True) except OSError as e: + strerror = force_text(e.strerror, DEFAULT_LOCALE_ENCODING, + strings_only=True) six.reraise(os_err_exc_type, os_err_exc_type('Error executing %s: %s' % - (args[0], e.strerror)), sys.exc_info()[2]) + (args[0], strerror)), sys.exc_info()[2]) output, errors = p.communicate() return ( output, |
