Comment 10 for bug 1008898

Revision history for this message
In , Stéphane Graber (stgraber) wrote :

To try and give a bit more background on what's going on here.

We have a piece of python called nm.py in the Ubuntu Installer that talks over DBUS to Network Manager.

That piece of code was designed to work with both python2 and python3, however we noticed that it completely fails on python3 because of invalid signature.

The script can be found at: http://paste.ubuntu.com/1025375/
The workaround we applied is: http://paste.ubuntu.com/1025377/

Basically, with python2, the following:
self.manager.AddAndActivateConnection(obj, dbus.ObjectPath(device), dbus.ObjectPath(saved_path))

Would match the service signature of "a{sa{sv}}oo".

But the same code running with python3 doesn't as the objects appear to get downcasted to strings, before checking for the existing signatures.

This obviously makes the program crash as "a{sa{sv}}ss" (python3) != "a{sa{sv}}oo" (service).