提交 5589ff28 编写于 作者: X Xavier Fernandez

Call locale.setlocale() to load locale

上级 c0798f73
#!/usr/bin/env python
from __future__ import absolute_import
import locale
import logging
import os
import optparse
......@@ -209,6 +210,9 @@ def main(args=None):
sys.stderr.write(os.linesep)
sys.exit(1)
# Needed for locale.getpreferredencoding(False) to work
# in pip.utils.encoding.auto_decode
locale.setlocale(locale.LC_ALL, '')
command = commands_dict[cmd_name](isolated=check_isolated(cmd_args))
return command.main(cmd_args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册