[gstreamer-bugs] [Bug 341114] New: pygst.require uses asserts rather than real error checking
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue May 9 02:15:55 PDT 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=341114
GStreamer | gst-python | Ver: 0.10.2
Summary: pygst.require uses asserts rather than real error
checking
Product: GStreamer
Version: 0.10.2
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: minor
Priority: Normal
Component: gst-python
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: piman at sacredchao.net
QAContact: johan at gnome.org
GNOME version: Unspecified
GNOME milestone: Unspecified
+++ This bug was initially created as a clone of Bug #341113 +++
pygst.require uses the assert keyword to check if the requested version is
available, and doesn't conflict with a previous requested one. However, assert
statements in Python are stripped when using python -O, and so can't be used
for real run-time sanity checks. They should be replaced by conditionals that
raise appropriate error types (probably ValueError, or a custom subclass of
it).
Example:
piman at toybox:~$ python -O
Python 2.3.5 (#2, Mar 6 2006, 10:12:24)
[GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gst
>>> import pygst
>>> pygst.require("0.8")
>>> pygst.require("0.10")
>>>
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list