8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22f3425 commit 68a8ca6Copy full SHA for 68a8ca6
Modules/_io/_iomodule.c
@@ -730,9 +730,11 @@ PyInit__io(void)
730
"UnsupportedOperation", PyExc_OSError, PyExc_ValueError);
731
if (state->unsupported_operation == NULL)
732
goto fail;
733
- if (PyModule_AddObject(m, "UnsupportedOperation",
734
- Py_NewRef(state->unsupported_operation)) < 0)
+ if (PyModule_AddObjectRef(m, "UnsupportedOperation",
+ state->unsupported_operation) < 0)
735
+ {
736
737
+ }
738
739
/* BlockingIOError, for compatibility */
740
if (PyModule_AddObjectRef(m, "BlockingIOError",
@@ -785,7 +787,6 @@ PyInit__io(void)
785
787
return m;
786
788
789
fail:
- Py_XDECREF(state->unsupported_operation);
790
Py_DECREF(m);
791
return NULL;
792
}
0 commit comments