From e788c9c78dff307cf50c86e5ffa8dc92f1734302 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 14 Apr 2011 20:47:27 -0400 Subject: get_output_encoding falls back to get_encoding if sys.__stdout__ is redirected. --- libbe/util/encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbe/util') 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() -- cgit