summaryrefslogtreecommitdiff
path: root/tests/testhelpermodule.c
diff options
context:
space:
mode:
authorMikhail Fludkov <misha@pexip.com>2016-02-19 16:27:53 +0100
committerChristoph Reiter <creiter@src.gnome.org>2017-03-20 18:16:22 +0100
commit3fe9213a3886ffa7a380dc08c5d636cda5865462 (patch)
tree67214e1860b6232d9037756076942dcbee3675f1 /tests/testhelpermodule.c
parent399939b55860211e0ab64bdfbfada2c86be8bf64 (diff)
downloadpygobject-3fe9213a3886ffa7a380dc08c5d636cda5865462.tar.gz
testhelper: propagate exception if _gobject could not be imported
https://bugzilla.gnome.org/show_bug.cgi?id=772949
Diffstat (limited to 'tests/testhelpermodule.c')
-rw-r--r--tests/testhelpermodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
index 66c0155b..fc62b29f 100644
--- a/tests/testhelpermodule.c
+++ b/tests/testhelpermodule.c
@@ -612,9 +612,13 @@ static PyMethodDef testhelper_functions[] = {
PYGLIB_MODULE_START(testhelper, "testhelper")
{
+ PyObject *gobject_module;
PyObject *m, *d;
-
- pygobject_init(-1, -1, -1);
+
+
+ if ((gobject_module = pygobject_init(-1, -1, -1)) == NULL)
+ return NULL;
+ Py_DECREF (gobject_module);
d = PyModule_GetDict(module);