Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions dbus_next/glib/proxy_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ def call_notify(msg, err):
except DBusError as e:
err = e

callback(msg.body, err)
if not out_len:
body = None
elif out_len == 1:
body = msg.body[0]
else:
body = msg.body

callback(body, err)

self.bus.call(
Message(destination=self.bus_name,
Expand Down Expand Up @@ -162,12 +169,7 @@ def callback(body, err):
if call_error:
raise call_error

if not out_len:
return None
elif out_len == 1:
return call_body[0]
else:
return call_body
return call_body

method_name = f'call_{BaseProxyInterface._to_snake_case(intr_method.name)}'
method_name_sync = f'{method_name}_sync'
Expand Down