0001-Clear-Python-error-indicator-after-logging-56572.patch
bindings/python/wrapper_top.c | ||
---|---|---|
739 | 739 |
G_GNUC_UNUSED gpointer user_data) |
740 | 740 |
{ |
741 | 741 |
PyObject *logger_object = get_logger_object(domain), *result; |
742 | ||
743 |
if (PyErr_Occurred()) { |
|
744 |
PyErr_Print(); |
|
745 |
PyErr_Clear(); |
|
746 |
return; |
|
747 |
} |
|
748 | ||
742 | 749 |
char *method = NULL; |
743 | 750 | |
744 | 751 |
if (! logger_object) { |
... | ... | |
773 | 780 |
} else { |
774 | 781 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "lasso could not call method %s on its logger", method); |
775 | 782 |
} |
783 |
/* clear any exception emitted during log call */ |
|
784 |
if (PyErr_Occurred()) { |
|
785 |
PyErr_Print(); |
|
786 |
} |
|
787 |
PyErr_Clear(); |
|
776 | 788 |
} |
777 |
- |