mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
pygst.py.in: use 'raise StandardError' instead of 'assert' so that compiled code raise a noticeable exception.
Original commit message from CVS: * pygst.py.in: use 'raise StandardError' instead of 'assert' so that compiled code raise a noticeable exception. Closes #332586
This commit is contained in:
parent
37e88dd9f6
commit
18136f0905
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-02-27 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* pygst.py.in:
|
||||
use 'raise StandardError' instead of 'assert' so that compiled code
|
||||
raise a noticeable exception.
|
||||
Closes #332586
|
||||
|
||||
2006-02-22 Joe Wreschnig <piman@sacredchao.net>
|
||||
|
||||
reviewed by: Edward Hervey <edward@fluendo.com>
|
||||
|
|
12
pygst.py.in
12
pygst.py.in
|
@ -41,15 +41,15 @@ def require(version):
|
|||
global _pygst_required_version
|
||||
|
||||
if _pygst_required_version != None:
|
||||
assert _pygst_required_version == version, \
|
||||
"a different version of gst was already required"
|
||||
if _pygst_required_version != version:
|
||||
raise StandardError, "a different version of gst was already required"
|
||||
return
|
||||
|
||||
assert not sys.modules.has_key('gst'), \
|
||||
"pygst.require() must be called before importing gst"
|
||||
if not sys.modules.has_key('gst'):
|
||||
raise StandardError, "pygst.require() must be called before importing gst"
|
||||
|
||||
assert version == _pygst_version, \
|
||||
"Only version '%s' is available" % _pygst_version
|
||||
if version != _pygst_version:
|
||||
raise StandardError, "Only version '%s' is available" % _pygst_version
|
||||
|
||||
# move the pygst path to the front
|
||||
while _pygst_dir in sys.path:
|
||||
|
|
Loading…
Reference in a new issue