diff options
author | Simon McVittie <smcv@debian.org> | 2019-09-12 10:52:13 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2019-09-12 10:52:13 +0100 |
commit | 639f114b09ddacda96732f941631eb7e7ca120db (patch) | |
tree | cd42da5b1a0745fe62ecae7d2953eb855b8a52e1 /dbus_bindings/pending-call.c | |
parent | 597d360f74ea54b33c218fbbe17c64c0297c7076 (diff) | |
parent | 5426797ad2f243aeef3e934d35334ab7183bfb6d (diff) |
New upstream version 1.2.12
Diffstat (limited to 'dbus_bindings/pending-call.c')
-rw-r--r-- | dbus_bindings/pending-call.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/dbus_bindings/pending-call.c b/dbus_bindings/pending-call.c index 50b2998..636095f 100644 --- a/dbus_bindings/pending-call.c +++ b/dbus_bindings/pending-call.c @@ -79,20 +79,15 @@ _pending_call_notify_function(DBusPendingCall *pc, PyObject *list) { PyGILState_STATE gil = PyGILState_Ensure(); - PyObject *et, *ev, *tb; - PyObject *handler; - DBusMessage *msg; - - PyErr_Fetch(&et, &ev, &tb); - /* BEGIN CRITICAL SECTION * While holding the GIL, make sure the callback only gets called once * by deleting it from the 1-item list that's held by libdbus. */ - handler = PyList_GetItem(list, 0); + PyObject *handler = PyList_GetItem(list, 0); + DBusMessage *msg; if (!handler) { - PyErr_WriteUnraisable(list); + PyErr_Print(); goto release; } if (handler == Py_None) { @@ -118,7 +113,7 @@ _pending_call_notify_function(DBusPendingCall *pc, PyObject *ret = PyObject_CallFunctionObjArgs(handler, msg_obj, NULL); if (!ret) { - PyErr_WriteUnraisable(handler); + PyErr_Print(); } Py_CLEAR(ret); Py_CLEAR(msg_obj); @@ -129,7 +124,6 @@ _pending_call_notify_function(DBusPendingCall *pc, release: Py_CLEAR(handler); - PyErr_Restore(et, ev, tb); PyGILState_Release(gil); } |