Merge pull request #2481 from zsiciarz/ticket-22335

Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems.
This commit is contained in:
Claude Paroz 2014-03-26 08:52:09 +01:00
commit ab4c96cff0
1 changed files with 3 additions and 1 deletions

View File

@ -20,8 +20,10 @@ def popen_wrapper(args, os_err_exc_type=CommandError):
p = Popen(args, shell=False, stdout=PIPE, stderr=PIPE, p = Popen(args, shell=False, stdout=PIPE, stderr=PIPE,
close_fds=os.name != 'nt', universal_newlines=True) close_fds=os.name != 'nt', universal_newlines=True)
except OSError as e: 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' % 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() output, errors = p.communicate()
return ( return (
output, output,