Commit f852bb33 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Merge pull request #8439 from stagedml:fix-baremetal-stdout

PiperOrigin-RevId: 308562689
parents bc6bf2f4 e61c0ebc
...@@ -40,7 +40,7 @@ def _stdout_utf8(): ...@@ -40,7 +40,7 @@ def _stdout_utf8():
codecs.lookup("utf-8") codecs.lookup("utf-8")
except LookupError: except LookupError:
return False return False
return sys.stdout.encoding == "UTF-8" return getattr(sys.stdout, "encoding", "") == "UTF-8"
if _stdout_utf8(): if _stdout_utf8():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment