Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
python: Clear AttributeError sometimes created in callback_defined (R…
…HBZ#1693283). When we test if a callback is defined in the Python code, we try to convert the callback name into a Python attribute using PyObject_GetAttrString. If this fails (indicating the callback isn't defined) it sets the global PyErr indicator to some random error message. At a later point we may test the global PyErr and report this error unexpectedly, which is what happened in https://bugzilla.redhat.com/show_bug.cgi?id=1693283#c7 A simple way to fix this is to call PyErr_Clear() along the not found path. Thanks: Tomáš Golembiovský and Junqin Zhou.
- Loading branch information