summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index a71ecc5..97f2b56 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -908,7 +908,7 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
void *buf = XML_GetBuffer(self->itself, BUF_SIZE);
if (buf == NULL) {
Py_XDECREF(readmethod);
- return PyErr_NoMemory();
+ return get_parse_result(self, 0);
}
bytes_read = readinst(buf, BUF_SIZE, readmethod);