Skip to content

Commit

Permalink
fix: silently ignore exceptions threw in PyObject_GetAttrString durin…
Browse files Browse the repository at this point in the history
…g pit->name resolve
  • Loading branch information
sumerc committed Oct 31, 2024
1 parent b69ae6c commit c27c61b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yappi/_yappi.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,12 @@ _code2pit(PyFrameObject *fobj, uintptr_t current_tag)
if (class_name) {
pit->name = PyStr_FromFormat("%s.%s", PyStr_AS_CSTRING(class_name), PyStr_AS_CSTRING(cobj->co_name));
Py_DECREF(class_name);
} else {
PyErr_Clear();
}
Py_DECREF(class_obj);
} else {
PyErr_Clear();
}
}
}
Expand Down

0 comments on commit c27c61b

Please sign in to comment.