mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
This commit is contained in:
parent
8a045cb93b
commit
2606a6f197
28 changed files with 79 additions and 87 deletions
|
@ -66,7 +66,7 @@ def find_best_ssl_dir(sources):
|
|||
# note: do not abspath s; the build will fail if any
|
||||
# higher up directory name has spaces in it.
|
||||
fnames = os.listdir(s)
|
||||
except os.error:
|
||||
except OSError:
|
||||
fnames = []
|
||||
for fname in fnames:
|
||||
fqn = os.path.join(s, fname)
|
||||
|
|
|
@ -62,7 +62,7 @@ def find_best_ssl_dir(sources):
|
|||
# note: do not abspath s; the build will fail if any
|
||||
# higher up directory name has spaces in it.
|
||||
fnames = os.listdir(s)
|
||||
except os.error:
|
||||
except OSError:
|
||||
fnames = []
|
||||
for fname in fnames:
|
||||
fqn = os.path.join(s, fname)
|
||||
|
|
|
@ -71,7 +71,7 @@ def find_best_ssl_dir(sources):
|
|||
# note: do not abspath s; the build will fail if any
|
||||
# higher up directory name has spaces in it.
|
||||
fnames = os.listdir(s)
|
||||
except os.error:
|
||||
except OSError:
|
||||
fnames = []
|
||||
for fname in fnames:
|
||||
fqn = os.path.join(s, fname)
|
||||
|
|
|
@ -1794,9 +1794,9 @@ PyMODINIT_FUNC PyInit_winreg(void)
|
|||
if (PyDict_SetItemString(d, "HKEYType",
|
||||
(PyObject *)&PyHKEY_Type) != 0)
|
||||
return NULL;
|
||||
Py_INCREF(PyExc_WindowsError);
|
||||
Py_INCREF(PyExc_OSError);
|
||||
if (PyDict_SetItemString(d, "error",
|
||||
PyExc_WindowsError) != 0)
|
||||
PyExc_OSError) != 0)
|
||||
return NULL;
|
||||
|
||||
/* Add the relevant constants */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue