Skip to content

Commit

Permalink
make interface optional on method calls
Browse files Browse the repository at this point in the history
The dbus spec allows the interface to be optional on
method calls. In that case, allow the message to match
on any method with a matching name and signature.

altdesktop#163
  • Loading branch information
izak committed Jun 11, 2024
1 parent ab566e1 commit 24621c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dbus_next/message_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,12 @@ def _find_message_handler(self, msg):
for method in ServiceInterface._get_methods(interface):
if method.disabled:
continue
if msg._matches(interface=interface.name,
member=method.name,
signature=method.in_signature):
if msg.interface is None and msg._matches(
member=method.name,
signature=method.in_signature
) or msg._matches(interface=interface.name,
member=method.name,
signature=method.in_signature):
handler = self._make_method_handler(interface, method)
break
if handler:
Expand Down

0 comments on commit 24621c5

Please sign in to comment.