summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Singer <lsinger@calltech.edu>2010-08-30 11:57:07 +0200
committerAlessandro Decina <alessandro.d@gmail.com>2010-08-30 11:57:07 +0200
commit2c31e12c5eccf74415ccdc643affa5c81547d4da (patch)
tree868e21aa8272305be5080da1e9cb2bc470ed79b1
parent01dda89d42ed5b72d3dde6b6432245dc968f8114 (diff)
plugin: fix spurious exceptions in pygst_require. Fixes #624592.
-rw-r--r--plugin/gstpythonplugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/gstpythonplugin.c b/plugin/gstpythonplugin.c
index f7e37a5..b0c45d5 100644
--- a/plugin/gstpythonplugin.c
+++ b/plugin/gstpythonplugin.c
@@ -283,10 +283,13 @@ pygst_require (gchar * version)
283 modules = PySys_GetObject ("modules"); 283 modules = PySys_GetObject ("modules");
284 /* Try to see if 'gst' is already imported */ 284 /* Try to see if 'gst' is already imported */
285 if (!(gst = PyMapping_GetItemString (modules, "gst"))) { 285 if (!(gst = PyMapping_GetItemString (modules, "gst"))) {
286 PyErr_Clear ();
286 287
287 /* if not, see if 'pygst' was already imported. If so, we assume that 288 /* if not, see if 'pygst' was already imported. If so, we assume that
288 * 'pygst.require' has already been called. */ 289 * 'pygst.require' has already been called. */
289 if (!(pygst = PyMapping_GetItemString (modules, "pygst"))) { 290 if (!(pygst = PyMapping_GetItemString (modules, "pygst"))) {
291 PyErr_Clear ();
292
290 if (!(pygst = PyImport_ImportModule ("pygst"))) { 293 if (!(pygst = PyImport_ImportModule ("pygst"))) {
291 GST_ERROR ("the pygst module is not available!"); 294 GST_ERROR ("the pygst module is not available!");
292 goto error; 295 goto error;