Skip to content

Commit c9805bc

Browse files
committed
Add a clarifying comment why PyErr_Occurred() check
1 parent 2ee4226 commit c9805bc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/lazyimportobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ lazy_import_getattro(PyObject *op, PyObject *name) {
8787
PyObject *value = _PyObject_GenericGetAttrWithDict(op, name, NULL, /* suppress */1);
8888
if (value == NULL) {
8989
if (PyErr_Occurred()) {
90+
/* Bubble up earlier unrelated exception */
9091
return NULL;
9192
}
9293
PyObject *lz_name = _PyLazyImport_GetName(op);

0 commit comments

Comments
 (0)