From 6ff71a4b4f442c928ae7954c245875d51b3d2648 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 6 Mar 2024 13:31:01 -0500 Subject: [PATCH] prev --- scripts/monitor_dbus_signals.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/monitor_dbus_signals.py b/scripts/monitor_dbus_signals.py index e708d85..ab6f85e 100755 --- a/scripts/monitor_dbus_signals.py +++ b/scripts/monitor_dbus_signals.py @@ -215,15 +215,6 @@ def _interfaces_removed(object_path, interfaces): :param str object_path: D-Bus object path :param list interfaces: list of interfaces removed """ - interfaces = { - k: v for k, v in interfaces.items() if re.fullmatch(_INTERFACE_RE, k) - } - - 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:", @@ -237,7 +228,8 @@ def _interfaces_removed(object_path, interfaces): if object_path in _MO.keys(): for interface in interfaces: - del _MO[object_path][interface] + if interface in _MO[object_path]: + del _MO[object_path][interface] # The InterfacesRemoved signal is sent when an object is # removed as well as when a single interface is removed.