mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).
This commit is contained in:
parent
69b83b113f
commit
b3be216b41
53 changed files with 1815 additions and 300 deletions
|
@ -121,9 +121,14 @@ open_the_file(PyFileObject *f, char *name, char *mode)
|
|||
}
|
||||
if (f->f_fp == NULL) {
|
||||
#ifdef NO_FOPEN_ERRNO
|
||||
/* Metroworks only, not testable, so unchanged */
|
||||
/* Metroworks only, wich does not always sets errno */
|
||||
if (errno == 0) {
|
||||
PyErr_SetString(PyExc_IOError, "Cannot open file");
|
||||
PyObject *v;
|
||||
v = Py_BuildValue("(is)", 0, "Cannot open file");
|
||||
if (v != NULL) {
|
||||
PyErr_SetObject(PyExc_IOError, v);
|
||||
Py_DECREF(v);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue