dbus-python tutorial error in Network Interface example

John Whitmore <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
I'm only starting out and trying to get my head around this to start using the
ModemManager API. I was trying to work through the tutorial for python use of
D-Bus at http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html

One of the first examples is:

    import dbus
    bus = dbus.SystemBus()
    eth0 = bus.get_object('org.freedesktop.NetworkManager',
                          '/org/freedesktop/NetworkManager/Devices/eth0')
    props = eth0.getProperties(dbus_interface='org.freedesktop.NetworkManager.Devices')

I'm using a different interface name as my distro isn't using "eth0" but even
so that last line "getProperties" fails:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "getProperties" with signature "" on interface "org.freedesktop.NetworkManager.Devices" doesn't exist


I then went off looking at the documentated API at:

https://developer.gnome.org/NetworkManager/unstable/spec.html#org.freedesktop.NetworkManager

That confuses me even more because it appears that NetworkManager doesn't have
a "Devices" Interface but rather a "Devices" Property. That can't be right
because the previous line in the example code:

    eth0 = bus.get_object('org.freedesktop.NetworkManager',
                          '/org/freedesktop/NetworkManager/Devices/eth0')

Does work?

OK I've got a lot to read and a lot to learn but if the example given in the
documentation doesn't work I'm going to be more confused then I already am.

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.