summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
commit2606a6f197a49f04611cb5cb0d67404d1ab14481 (patch)
tree35c228625105050ec2f593e6b362ce9e2498c760 /PC
parent8a045cb93bded97220422a957941bb68341429d1 (diff)
downloadcpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.zip
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.gz
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.bz2
Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
Diffstat (limited to 'PC')
-rw-r--r--PC/VC6/build_ssl.py2
-rw-r--r--PC/VS7.1/build_ssl.py2
-rw-r--r--PC/VS8.0/build_ssl.py2
-rw-r--r--PC/winreg.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/PC/VC6/build_ssl.py b/PC/VC6/build_ssl.py
index 95af084..89554b8 100644
--- a/PC/VC6/build_ssl.py
+++ b/PC/VC6/build_ssl.py
@@ -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)
diff --git a/PC/VS7.1/build_ssl.py b/PC/VS7.1/build_ssl.py
index 2e9f4e3..36f9d5c 100644
--- a/PC/VS7.1/build_ssl.py
+++ b/PC/VS7.1/build_ssl.py
@@ -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)
diff --git a/PC/VS8.0/build_ssl.py b/PC/VS8.0/build_ssl.py
index dc13ef5..bc6eba4 100644
--- a/PC/VS8.0/build_ssl.py
+++ b/PC/VS8.0/build_ssl.py
@@ -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)
diff --git a/PC/winreg.c b/PC/winreg.c
index 091b477..d3d6b83 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -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 */