Skip to content

Commit 06c7a11

Browse files
committed
Need to clear error before return.
1 parent f721f82 commit 06c7a11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lazy_object_proxy/cext.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ static PyObject *Proxy_fspath(ProxyObject *self)
234234
}
235235

236236
func = PyObject_GetAttrString(self->wrapped, "__fspath__");
237-
if (NULL == func) {
237+
if (func == NULL) {
238+
PyErr_Clear();
238239
Py_INCREF(self->wrapped);
239240
return self->wrapped;
240241
}

0 commit comments

Comments
 (0)