removing a connection from python - stuck



Hello,
I am completely stuck again. I really hope some one can give me a hint.
I can do most of the basic operations from python now but I cant figure out how to delete a connection.

I would like to use the connection.delete() method but all "connections" I can find seem to be paths and not really the connection object.
I have no clue how to deal with that.

E.g.
    service_name = "org.freedesktop.NetworkManager"
    proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManager/Settings")
    settings = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Settings")
    conn = settings.GetConnectionByUuid(uuid)
    conn.delete()


gives
AttributeError: 'dbus.ObjectPath' object has no attribute 'delete'

am I on the wrong track or what do I miss?

best regards, Jonas


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