- bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
- PyObject *exc = PyErr_Occurred();
-
- if (!exc) {
- goto end;
- }
-
- if (PyErr_GivenExceptionMatches(exc,
- py_mod_bt2_exc_try_again_type)) {
- status = BT_SELF_COMPONENT_STATUS_AGAIN;
- } else if (PyErr_GivenExceptionMatches(exc,
- py_mod_bt2_exc_stop_type)) {
- status = BT_SELF_COMPONENT_STATUS_END;
- } else {
- bt2_py_loge_exception();
- status = BT_SELF_COMPONENT_STATUS_ERROR;
- }
-
-end:
- PyErr_Clear();
- return status;