Py3 codecs.open doesn't like mode='t'
This commit is contained in:
1 parent
f82ec61463
commit
5edeecdc8c
1 file changed
+2
@@ -1056,6 +1056,8 @@ def bom_aware_open(filename, encoding="ascii", mode="r", **kwargs):
|
||||
if header.startswith(bom):
|
||||
encoding += "-sig"
|
||||
|
||||
# Py3 doesn't like 't'
|
||||
mode = mode.replace('t','')
|
||||
return codecs.open(filename, encoding=encoding, mode=mode, **kwargs)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user