remove the 't' mode for codecs.open

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-05-25 21:35:14 +00:00
parent 2e218eb0f9
commit 1d3fc8dad2
2 changed files with 2 additions and 0 deletions

View File

@@ -784,6 +784,7 @@ def textfile_open(filename, mode='rt'):
assert 't' in mode
if sys.version_info < (3,):
import codecs
mode = mode.replace('t', '')
return codecs.open(filename, mode, encoding='utf-8')
else:
return open(filename, mode, encoding='utf-8')