diff options
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r-- | Modules/_io/textio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index e77d844..a5b2ca7 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1185,7 +1185,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, } /* Check we have been asked for a real text encoding */ - codec_info = _PyCodec_LookupTextEncoding(encoding, "codecs.open()"); + codec_info = _PyCodec_LookupTextEncoding(encoding, NULL); if (codec_info == NULL) { Py_CLEAR(self->encoding); goto error; @@ -1324,8 +1324,7 @@ textiowrapper_change_encoding(textio *self, PyObject *encoding, } // Create new encoder & decoder - PyObject *codec_info = _PyCodec_LookupTextEncoding( - c_encoding, "codecs.open()"); + PyObject *codec_info = _PyCodec_LookupTextEncoding(c_encoding, NULL); if (codec_info == NULL) { Py_DECREF(encoding); Py_DECREF(errors); |