102
102
mandos_serv_object_manager = dbus.Interface(
103
103
mandos_dbus_object, dbus_interface=dbus.OBJECT_MANAGER_IFACE)
105
log.debug("D-Bus: %s:%s:%s.GetManagedObjects()", dbus_busname,
106
server_dbus_path, dbus.OBJECT_MANAGER_IFACE)
106
log.debug("D-Bus: %s:%s:%s.GetManagedObjects()", dbus_busname,
107
server_dbus_path, dbus.OBJECT_MANAGER_IFACE)
108
108
with SilenceLogger("dbus.proxies"):
109
all_clients = {path: ifs_and_props[client_dbus_interface]
110
for path, ifs_and_props in
111
mandos_serv_object_manager
112
.GetManagedObjects().items()
113
if client_dbus_interface in ifs_and_props}
109
managed_objects = (mandos_serv_object_manager
110
.GetManagedObjects())
114
111
except dbus.exceptions.DBusException as e:
115
112
log.critical("Failed to access Mandos server through D-Bus:"
119
# Compile dict of (clients: properties) to process
117
for path, ifs_and_props in managed_objects.items():
119
all_clients[path] = ifs_and_props[client_dbus_interface]
123
# Compile dict of (clientpath: properties) to process
122
124
if not clientnames:
123
125
clients = all_clients
125
128
for name in clientnames:
126
129
for objpath, properties in all_clients.items():
127
130
if properties["Name"] == name: