]> granicus.if.org Git - python/commitdiff
Remove unnecessary call to PyErr_Clear.
authorEzio Melotti <none@none>
Mon, 11 Apr 2011 00:45:25 +0000 (03:45 +0300)
committerEzio Melotti <none@none>
Mon, 11 Apr 2011 00:45:25 +0000 (03:45 +0300)
Modules/pyexpat.c

index af85582ab8cfc4b493d191b26748c57570159fc8..3bd68a9441b6f4a6d8d62a16a40397bb0c4c190c 100644 (file)
@@ -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;