Your message dated Sat, 13 Mar 2021 19:40:16 +0100
with message-id <20210313184016.6d7muxjbpazdy...@fatal.se>
and subject line Re: python-networkmanager: 
org.freedesktop.DBus.Error.ServiceUnknown if NetworkManager service restarts
has caused the Debian Bug report #934743,
regarding python-networkmanager: org.freedesktop.DBus.Error.ServiceUnknown if 
NetworkManager service restarts
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
934743: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934743
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
Version: 2.2-1

Sorry I forgot to list this bug as closed in the debian/changelog entry
I just uploaded. Manually closing this now since the fix should be
included in the version I just uploaded.

Regards,
Andreas Henriksson

--- End Message ---

Reply via email to