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 564620 - [0.11][API] Make gst.Pad.query_* raise exceptions
[0.11][API] Make gst.Pad.query_* raise exceptions
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-15 15:31 UTC by Alessandro Decina
Modified: 2012-02-08 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alessandro Decina 2008-12-15 15:31:54 UTC
Currently gst.Pad.query_* methods return None when the query fails.
This is particularly annoying as when a query succeeds the result is a two element tuple, so you it's natural to unpack it like

a, b = pad.query_*(...)

except that when there's a failure, python throws an exception at you as None can't be unpacked in two items.
The methods should raise exceptions or at least return (None, None).
Comment 1 Tim-Philipp Müller 2011-10-27 14:51:49 UTC
Is this still relevant if gst-python is not ported to 0.11 with only pygi being used? (ie. can it be fixed for pygi?)
Comment 2 Tobias Mueller 2012-02-08 09:28:57 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 3 Tim-Philipp Müller 2012-02-08 10:02:24 UTC
Also somewhat related: bug #669016