Commit e61c0ebc authored by Sergey Mironov's avatar Sergey Mironov
Browse files

Handle non-login shell case in stdout utility

parent a341a46a
......@@ -40,7 +40,7 @@ def _stdout_utf8():
codecs.lookup("utf-8")
except LookupError:
return False
return sys.stdout.encoding == "UTF-8"
return getattr(sys.stdout, 'encoding', '') == "UTF-8"
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