Registering on device OnPropertiesChanged signal, register on the wrong interface.
After registering on a device, obtained using GetDevices function, the key on which the callback is registered is: ('org.freedesktop.NetworkManager.Device.Statistics', 'PropertiesChanged') While it should be ('org.freedesktop.NetworkManager.Device', 'PropertiesChanged')
- this is a degradation from a previous version, although not sure how previous.
Example: In [1]: import NetworkManager In [2]: NetworkManager.NetworkManager.GetDevices() Out[2]: [<NetworkManager.Modem at 0x7f4a8b3c1710>] In[3]: device = NetworkManager.NetworkManager.GetDevices()[0] In[4]: device.OnPropertiesChanged(lambda:None)
The root cause of the change is this line:
- interface_names = ['org.freedesktop.NetworkManager.Device', 'org.freedesktop.NetworkManager.Device.Statistics']
I just ran into this issue too. It seems to have been introduced in this commit nearly 2 years ago.
https://github.com/seveas/python-networkmanager/commit/c92cbd936da35cf9c9654db0d533e4775912af76
Removing org.freedesktop.NetworkManager.Device.Statistics from that list seems to fix it. I wonder why it was added in the first place?
Closing all PR's and issues prior to archiving this repository.