未验证 提交 1846b474 编写于 作者: W wopeizl 提交者: GitHub

fix print issue on win for py2 (#2849)

test=develop
上级 a510c175
......@@ -49,7 +49,10 @@ def to_str(string, encoding="utf-8"):
return string.decode(encoding)
elif sys.version_info.major == 2:
if isinstance(string, unicode):
return string.encode(encoding)
if os.name == 'nt':
return string
else:
return string.encode(encoding)
return string
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册