Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated

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


loop = GLib.MainLoop()

def properties_changed(interface_name, changed_properties,
    print (interface_name, changed_properties, invalidated_properties)

bus = dbus.SystemBus()
obj = bus.get_object("org.freedesktop.NetworkManager",
iface = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
iface.connect_to_signal("PropertiesChanged", properties_changed)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]