Skip to content

Commit e5a5238

Browse files
committed
Fix map_exception_to_dbus_error in limited API
1 parent a03097d commit e5a5238

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sdbus/sd_bus_internals_funcs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ static PyObject* map_exception_to_dbus_error(PyObject* Py_UNUSED(self), PyObject
140140
static PyObject* map_exception_to_dbus_error(PyObject* Py_UNUSED(self), PyObject* args) {
141141
PyObject* exception = NULL;
142142
PyObject* dbus_error_string = NULL;
143-
CALL_PYTHON_BOOL_CHECK(PyArg_ParseTuple(args, "Os", &exception, &dbus_error_string, NULL));
143+
CALL_PYTHON_BOOL_CHECK(PyArg_ParseTuple(args, "O!O!", PyExc_BaseException->ob_type, &exception, &PyUnicode_Type, &dbus_error_string, NULL));
144+
144145
#endif
145146
if (CALL_PYTHON_INT_CHECK(PyDict_Contains(dbus_error_to_exception_dict, dbus_error_string)) > 0) {
146147
PyErr_Format(PyExc_ValueError, "Dbus error %R is already mapped.", dbus_error_string);

0 commit comments

Comments
 (0)