diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index af85582ab8c..3bd68a9441b 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -966,7 +966,6 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f) readmethod = PyObject_GetAttrString(f, "read"); if (readmethod == NULL) { - PyErr_Clear(); PyErr_SetString(PyExc_TypeError, "argument must have 'read' attribute"); return NULL;