Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated
- From: Andrei Borzenkov <arvidjaar gmail com>
- To: networkmanager-list gnome org
- Subject: Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated
- Date: Wed, 14 Jul 2021 22:37:43 +0300
On 14.07.2021 21:57, mh mike franken de wrote:
RuntimeError: To make asynchronous calls, receive signals or export objects,
D-Bus connections must be attached to a main loop by passing mainloop=... to
the constructor or calling dbus.set_default_main_loop(...)
Here is full
import dbus, sys, uuid
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
DBusGMainLoop(set_as_default=True)
loop = GLib.MainLoop()
def properties_changed(interface_name, changed_properties,
invalidated_properties):
print (interface_name, changed_properties, invalidated_properties)
bus = dbus.SystemBus()
obj = bus.get_object("org.freedesktop.NetworkManager",
"/org/freedesktop/NetworkManager")
iface = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
iface.connect_to_signal("PropertiesChanged", properties_changed)
loop.run()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]