Skip to content

Commit e0977d0

Browse files
arkqjlatusek
authored andcommitted
Fix D-Bus error forwarding
1 parent cf41a7c commit e0977d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/tools/dbus-proxy-bluez.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ def on_method_return(self, conn, result, invocation):
169169
invocation.get_interface_name(),
170170
invocation.get_method_name())
171171
reply = conn.call_with_unix_fd_list_finish(result)
172-
invocation.return_value_with_unix_fd_list(
173-
reply[0], reply.out_fd_list)
172+
invocation.return_value_with_unix_fd_list(reply[0],
173+
reply.out_fd_list)
174174
except GLib.Error as e:
175-
invocation.return_gerror(e)
175+
_, name, message = e.message.split(":", 2)
176+
invocation.return_dbus_error(name, message.strip())
176177

177178
def on_signal_from_source(self, sender, path, iface, signal, params):
178179
logging.debug("Signal from source: %s %s.%s", path, iface, signal)

0 commit comments

Comments
 (0)