diff options
Diffstat (limited to 'dbus_bindings/server.c')
-rw-r--r-- | dbus_bindings/server.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/dbus_bindings/server.c b/dbus_bindings/server.c index 2080d6b..dfbfa53 100644 --- a/dbus_bindings/server.c +++ b/dbus_bindings/server.c @@ -190,12 +190,9 @@ DBusPyServer_new_connection_cb(DBusServer *server, void *data UNUSED) { PyGILState_STATE gil = PyGILState_Ensure(); - PyObject *et, *ev, *tb; PyObject *self = NULL; PyObject *method = NULL; - PyErr_Fetch(&et, &ev, &tb); - self = DBusPyServer_ExistingFromDBusServer(server); if (!self) goto out; TRACE(self); @@ -227,12 +224,12 @@ DBusPyServer_new_connection_cb(DBusServer *server, } out: + Py_CLEAR(method); + Py_CLEAR(self); + if (PyErr_Occurred()) - PyErr_WriteUnraisable(method); + PyErr_Print(); - Py_CLEAR(self); - Py_CLEAR(method); - PyErr_Restore(et, ev, tb); PyGILState_Release(gil); } |