Change order of io.UnsupportedOperation base classes.
This makes tests passing after changes by issue #5322.
This commit is contained in:
parent
5adfac2c1b
commit
606ab86c0e
|
@ -276,7 +276,7 @@ class OpenWrapper:
|
||||||
try:
|
try:
|
||||||
UnsupportedOperation = io.UnsupportedOperation
|
UnsupportedOperation = io.UnsupportedOperation
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
class UnsupportedOperation(ValueError, OSError):
|
class UnsupportedOperation(OSError, ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -654,7 +654,7 @@ PyInit__io(void)
|
||||||
/* UnsupportedOperation inherits from ValueError and IOError */
|
/* UnsupportedOperation inherits from ValueError and IOError */
|
||||||
state->unsupported_operation = PyObject_CallFunction(
|
state->unsupported_operation = PyObject_CallFunction(
|
||||||
(PyObject *)&PyType_Type, "s(OO){}",
|
(PyObject *)&PyType_Type, "s(OO){}",
|
||||||
"UnsupportedOperation", PyExc_ValueError, PyExc_IOError);
|
"UnsupportedOperation", PyExc_OSError, PyExc_ValueError);
|
||||||
if (state->unsupported_operation == NULL)
|
if (state->unsupported_operation == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
Py_INCREF(state->unsupported_operation);
|
Py_INCREF(state->unsupported_operation);
|
||||||
|
|
Loading…
Reference in New Issue