aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/util/encoding.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2011-04-14 20:47:27 -0400
committerW. Trevor King <wking@drexel.edu>2011-04-14 20:47:27 -0400
commite788c9c78dff307cf50c86e5ffa8dc92f1734302 (patch)
tree7beee91fd6ebc404cf0de206fde5d5a0afc24212 /libbe/util/encoding.py
parentb09cfb0cfecfb683e33490908b5ec59bed530938 (diff)
downloadbugseverywhere-e788c9c78dff307cf50c86e5ffa8dc92f1734302.tar.gz
get_output_encoding falls back to get_encoding if sys.__stdout__ is redirected.
Diffstat (limited to 'libbe/util/encoding.py')
-rw-r--r--libbe/util/encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbe/util/encoding.py b/libbe/util/encoding.py
index c759529..3cc425d 100644
--- a/libbe/util/encoding.py
+++ b/libbe/util/encoding.py
@@ -49,7 +49,7 @@ def get_input_encoding():
return get_encoding()
def get_output_encoding():
- return sys.__stdout__.encoding
+ return sys.__stdout__.encoding or get_encoding()
def get_filesystem_encoding():
return get_encoding()