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 678317 - malformed exception raised when creating Variant
malformed exception raised when creating Variant
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-18 13:20 UTC by David Keijser
Modified: 2012-06-20 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the patch (1.12 KB, patch)
2012-06-18 13:20 UTC, David Keijser
none Details | Review

Description David Keijser 2012-06-18 13:20:55 UTC
Created attachment 216674 [details] [review]
the patch

When trying to create Variant of a tuple but the value is not a tuple the wrong exception is raised.

python3
>>> from gi.repository import GLib
>>> GLib.Variant('(s)', 'test')
...
TypeError: exceptions must derive from BaseException

Attaching a patch that corrects the raise syntax
Comment 1 Martin Pitt 2012-06-20 09:14:36 UTC
Thanks! Pushed.