mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Add an errors parameter to open() and TextIOWrapper() to specify error handling.
This commit is contained in:
parent
c6fe37bab9
commit
e7fc50f2d0
7 changed files with 77 additions and 17 deletions
|
@ -2602,7 +2602,7 @@ call_find_module(char *name, PyObject *path)
|
|||
(char*)PyUnicode_GetDefaultEncoding();
|
||||
}
|
||||
fob = PyFile_FromFd(fd, pathname, fdp->mode, -1,
|
||||
(char*)encoding, NULL, 1);
|
||||
(char*)encoding, NULL, NULL, 1);
|
||||
if (fob == NULL) {
|
||||
close(fd);
|
||||
PyMem_FREE(found_encoding);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue