Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdb2df4

Browse files
committed
Remove unnecessary call to PyErr_Clear.
1 parent 47e120e commit fdb2df4

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

Modules/pyexpat.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
846846

847847
readmethod = PyObject_GetAttrString(f, "read");
848848
if (readmethod == NULL) {
849-
PyErr_Clear();
850849
PyErr_SetString(PyExc_TypeError,
851850
"argument must have 'read' attribute");
852851
return NULL;

0 commit comments

Comments
 (0)