Package: python3-networkmanager Version: 2.1-2 Tags: patch Forwarded: https://github.com/seveas/python-networkmanager/issues/66
If NetworkManager service restarts, it gets a new dbus unix process id. The python-networkmanager remains with the old id. since this process doesn't exist any more, a org.freedesktop.DBus.Error.ServiceUnknown exception is thrown. The parameter follow_name_owner_changes can be used in get_object() calls to prevent this. diff --git a/NetworkManager.py b/NetworkManager.py index 3d137fe..00f0729 100644 --- a/NetworkManager.py +++ b/NetworkManager.py @@ -258,7 +258,7 @@ def __eq__(self, other): @property def proxy(self): if not self._proxy: - self._proxy = dbus.SystemBus().get_object(self.dbus_service, self.object_path) + self._proxy = dbus.SystemBus().get_object(self.dbus_service, self.object_path, follow_name_owner_changes=True) self._proxy.created = time.time() elif self._proxy.created < self.last_disconnect: if self.is_transient: https://github.com/anrodlo/python-networkmanager/commit/88f1b0e4531f80e17af3ffe00b5816800ebb4c1a.diff _______________________________________________ Python-modules-team mailing list Python-modules-team@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team