Fix sys.stdout.encoding error
This commit is contained in:
parent
3c88752cf9
commit
a07c2ea292
@ -31,8 +31,10 @@ from libbmc.config import Config
|
|||||||
|
|
||||||
config = Config()
|
config = Config()
|
||||||
default_socket = socket.socket
|
default_socket = socket.socket
|
||||||
|
try:
|
||||||
stdout_encoding = sys.stdout.encoding
|
stdout_encoding = sys.stdout.encoding
|
||||||
if stdout_encoding is None:
|
assert(stdout_encoding is not None)
|
||||||
|
except (AttributeError, AssertionError):
|
||||||
stdout_encoding = 'UTF-8'
|
stdout_encoding = 'UTF-8'
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user