Fix work in progress line encoding in reader.py to not touch read data if self.encoding is None

This commit is contained in:
Dimitri Fontaine 2010-08-25 18:00:54 +02:00
parent d9c923590e
commit b323952e63

View File

@ -296,7 +296,10 @@ class UnbufferedFileReader:
% self.fd.tell())
last_line_read = True
yield line
if self.encoding is not None:
yield line.encode(self.encoding)
else:
yield line
return