Fix unicode errors when writing to sys.stdout.

This commit is contained in:
Bastian Kleineidam 2010-12-20 23:43:37 +01:00
parent 4fe9de2538
commit a9b6c10cd5
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,8 @@
Fixes:
- checking: Fix broken anchor checking.
Closes: SF bug #3140765
- logging: Allow Unicode strings to be written to stdout without
encoding errors.
Changes:

View file

@ -184,7 +184,7 @@ class Logger (object):
elif 'fd' in args:
self.fd = args['fd']
else:
self.fd = sys.stdout
self.fd = codecs.getwriter(self.output_encoding)(sys.stdout)
def start_fileoutput (self):
path = os.path.dirname(self.filename)