Skip to content

Commit 5842142

Browse files
Restore possibility to run without mainloop
1 parent 0c2e433 commit 5842142

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

NetworkManager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def __eq__(self, other):
258258
@property
259259
def proxy(self):
260260
if not self._proxy:
261-
self._proxy = dbus.SystemBus().get_object(self.dbus_service, self.object_path, follow_name_owner_changes=True)
261+
self._proxy = dbus.SystemBus().get_object(self.dbus_service, self.object_path,
262+
follow_name_owner_changes=dbus.get_default_main_loop() != None)
262263
self._proxy.created = time.time()
263264
elif self._proxy.created < self.last_disconnect:
264265
if self.is_transient:

0 commit comments

Comments
 (0)