mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 17:09:48 +00:00
plugin: fix spurious exceptions in pygst_require. Fixes #624592.
This commit is contained in:
parent
01dda89d42
commit
2c31e12c5e
1 changed files with 3 additions and 0 deletions
|
@ -283,10 +283,13 @@ pygst_require (gchar * version)
|
|||
modules = PySys_GetObject ("modules");
|
||||
/* Try to see if 'gst' is already imported */
|
||||
if (!(gst = PyMapping_GetItemString (modules, "gst"))) {
|
||||
PyErr_Clear ();
|
||||
|
||||
/* if not, see if 'pygst' was already imported. If so, we assume that
|
||||
* 'pygst.require' has already been called. */
|
||||
if (!(pygst = PyMapping_GetItemString (modules, "pygst"))) {
|
||||
PyErr_Clear ();
|
||||
|
||||
if (!(pygst = PyImport_ImportModule ("pygst"))) {
|
||||
GST_ERROR ("the pygst module is not available!");
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue