summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/pyexpat.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 95a0980..ce66e5a 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -414,11 +414,9 @@ readinst(char *buf, int buf_size, PyObject *meth)
PyObject *str = NULL;
int len = -1;
- if ((bytes = PyInt_FromLong(buf_size)) == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetNone(PyExc_EOFError);
+ if ((bytes = PyInt_FromLong(buf_size)) == NULL)
goto finally;
- }
+
if ((arg = PyTuple_New(1)) == NULL)
goto finally;