Skip to content

Commit

Permalink
Fix map_exception_to_dbus_error in limited API
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Jun 13, 2022
1 parent a03097d commit e5a5238
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sdbus/sd_bus_internals_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ static PyObject* map_exception_to_dbus_error(PyObject* Py_UNUSED(self), PyObject
static PyObject* map_exception_to_dbus_error(PyObject* Py_UNUSED(self), PyObject* args) {
PyObject* exception = NULL;
PyObject* dbus_error_string = NULL;
CALL_PYTHON_BOOL_CHECK(PyArg_ParseTuple(args, "Os", &exception, &dbus_error_string, NULL));
CALL_PYTHON_BOOL_CHECK(PyArg_ParseTuple(args, "O!O!", PyExc_BaseException->ob_type, &exception, &PyUnicode_Type, &dbus_error_string, NULL));

#endif
if (CALL_PYTHON_INT_CHECK(PyDict_Contains(dbus_error_to_exception_dict, dbus_error_string)) > 0) {
PyErr_Format(PyExc_ValueError, "Dbus error %R is already mapped.", dbus_error_string);
Expand Down

0 comments on commit e5a5238

Please sign in to comment.