summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-07 11:32:09 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-07 11:32:09 (GMT)
commitd7d266c11387388bb1abe739e9011f5219861b63 (patch)
tree79f3aeead4e5964afcb4884508b1d754577f6f69
parent09e4a695d17f35375d3a2298ef78fae0e27af8ce (diff)
parent427f10b442bd4747262069596095cc3a8e0458e6 (diff)
downloadcpython-d7d266c11387388bb1abe739e9011f5219861b63.zip
cpython-d7d266c11387388bb1abe739e9011f5219861b63.tar.gz
cpython-d7d266c11387388bb1abe739e9011f5219861b63.tar.bz2
Merge from 3.6.
-rw-r--r--Lib/_pyio.py2
-rw-r--r--Modules/_io/_iomodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 569527b..8f93976 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -277,7 +277,7 @@ class OpenWrapper:
try:
UnsupportedOperation = io.UnsupportedOperation
except AttributeError:
- class UnsupportedOperation(ValueError, OSError):
+ class UnsupportedOperation(OSError, ValueError):
pass
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 60f8b54..f4d3cbd 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -683,7 +683,7 @@ PyInit__io(void)
/* UnsupportedOperation inherits from ValueError and IOError */
state->unsupported_operation = PyObject_CallFunction(
(PyObject *)&PyType_Type, "s(OO){}",
- "UnsupportedOperation", PyExc_ValueError, PyExc_IOError);
+ "UnsupportedOperation", PyExc_OSError, PyExc_ValueError);
if (state->unsupported_operation == NULL)
goto fail;
Py_INCREF(state->unsupported_operation);