After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740145 - update python examples
update python examples
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-1.0
 
 
Reported: 2014-11-14 21:34 UTC by Dan Winship
Modified: 2014-11-15 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2014-11-14 21:34:10 UTC
The python examples had gotten out-of-date. Also, testing them out uncovered an introspection annotation bug.

danw/examples-bgoXXXXXX
Comment 1 Dan Williams 2014-11-14 22:45:04 UTC
I noticed that the wifi list networks exmaple didn't print the SSID (only <GByteArray 0x25323525>) so I pushed a fixup for that.

We should also go through and check other locations for the @array/@len pattern and update the annotation so that they work in python.

Also the 'list-connections.py' prints out routes/addresses as "<GPtrArray 0x2352353>", not sure if we can easily fix that up?

The rest of the changes look good to me.
Comment 2 Dan Winship 2014-11-15 14:48:22 UTC
(In reply to comment #1)
> We should also go through and check other locations for the @array/@len pattern
> and update the annotation so that they work in python.

Done; they were all in nm-utils, and were all fallout from my changing a bunch of GByteArray-based APIs to not use GByteArray (to make them GByteArray/GBytes agnostic).

While scanning for (out) arguments, I also found two more places where we needed (transfer) annotations too, and fixed those.

> Also the 'list-connections.py' prints out routes/addresses as "<GPtrArray
> 0x2352353>", not sure if we can easily fix that up?

It's just printing the raw property value. We can't easily fix it. At some point I want to add "nm_setting_property_to_string()" though...


pushed with fixes