diff --git a/scripts/monitor_dbus_signals.py b/scripts/monitor_dbus_signals.py index 75f2a05..1564e11 100755 --- a/scripts/monitor_dbus_signals.py +++ b/scripts/monitor_dbus_signals.py @@ -170,6 +170,11 @@ def _interfaces_added(object_path, interfaces_added): :param str object_path: D-Bus object path :param dict interfaces_added: map of interfaces to D-Bus properties """ + if object_path == _TOP_OBJECT_PATH: + interfaces_added = { + k: v for k, v in interfaces_added.items() if k in _TOP_OBJECT_INTERFACES + } + try: print( "Interfaces added:", @@ -197,6 +202,11 @@ def _interfaces_removed(object_path, interfaces): :param str object_path: D-Bus object path :param list interfaces: list of interfaces removed """ + if object_path == _TOP_OBJECT_PATH: + interfaces = { + k: v for k, v in interfaces.items() if k in _TOP_OBJECT_INTERFACES + } + try: print( "Interfaces removed:", @@ -270,6 +280,11 @@ def _properties_changed(*props_changed, object_path=None): ) from err if interface_name not in data: + if ( + object_path == _TOP_OBJECT_PATH + and interface_name not in _TOP_OBJECT_INTERFACES + ): + return data[interface_name] = MISSING_INTERFACE if data[interface_name] is MISSING_INTERFACE: