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

index ee59baf83f9eb9393360e68fa3d69a98f23040b1..40d93246fc17d0842af3656f5901a5db23690016 100644 (file)
@@ -846,7 +846,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;