Merge pull request #171 from omg2hei/master

fix : AttributeError in Python3
This commit is contained in:
Urinx
2017-04-03 08:19:00 +08:00
committed by GitHub
+1 -1
View File
@@ -1161,7 +1161,7 @@ class UnicodeStreamFilter:
def write(self, s):
if type(s) == str:
s = s.decode('utf-8')
s = s.encode().decode('utf-8')
s = s.encode(self.encode_to, self.errors).decode(self.encode_to)
self.target.write(s)