diff options
Diffstat (limited to 'gobject')
| -rw-r--r-- | gobject/gobjectmodule.c | 5 | ||||
| -rw-r--r-- | gobject/pygobject.h | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index e5165bd..7421629 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -2075,9 +2075,4 @@ initgobject(void) PyModule_AddObject(m, "TYPE_PARAM", pyg_type_wrapper_new(G_TYPE_PARAM)); PyModule_AddObject(m, "TYPE_OBJECT", pyg_type_wrapper_new(G_TYPE_OBJECT)); PyModule_AddObject(m, "TYPE_PYOBJECT", pyg_type_wrapper_new(PY_TYPE_OBJECT)); - - if (PyErr_Occurred()) { - PyErr_Print(); - Py_FatalError("can't initialise module gobject"); - } } diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 2c769d6..62c4cd2 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -151,11 +151,13 @@ struct _PyGObject_Functions *_PyGObject_API; if (PyCObject_Check(cobject)) \ _PyGObject_API = (struct _PyGObject_Functions *)PyCObject_AsVoidPtr(cobject); \ else { \ - Py_FatalError("could not find _PyGObject_API object"); \ + PyErr_SetString(PyExc_RuntimeError, \ + "could not find _PyGObject_API object"); \ return; \ } \ } else { \ - Py_FatalError("could not import gobject"); \ + PyErr_SetString(PyExc_ImportError, \ + "could not import gobject"); \ return; \ } \ } |
