Commit 46c91a11 authored by Colin Walters's avatar Colin Walters Committed by Tomeu Vizoso

Clear error if we failed the import

Otherwise we leave the exception set which causes bizarre problems
later in unrelated code.

https://bugzilla.redhat.com/show_bug.cgi?id=569885

https://bugzilla.gnome.org/show_bug.cgi?id=617796
parent e203dc7c
......@@ -27,11 +27,13 @@ _pygi_import (void)
module = PyImport_ImportModule("gi");
if (module == NULL) {
PyErr_Clear();
return -1;
}
api = PyObject_GetAttrString(module, "_API");
if (api == NULL) {
PyErr_Clear();
Py_DECREF(module);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment