diff options
author | Johan Dahlin <johan@gnome.org> | 2008-08-06 08:18:56 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-08-06 08:18:56 +0000 |
commit | 6f9ecc1cd9cc1498ffac79e1271b831a9be6b364 (patch) | |
tree | 71fd56ebbf410af71f15196387a107b5162024f9 | |
parent | a93bb251501bdef03b6ac1f7fe32c2ee76346acb (diff) | |
download | pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.tar.gz pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.tar.xz pygobject-6f9ecc1cd9cc1498ffac79e1271b831a9be6b364.zip |
return in case of error instead of trying to access the internal types.
2008-08-06 Johan Dahlin <johan@gnome.org>
* glib/pyglib.c (pyglib_init):
return in case of error instead of trying to access the internal
types.
svn path=/trunk/; revision=926
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | glib/pyglib.c | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2008-08-06 Johan Dahlin <johan@gnome.org> + + * glib/pyglib.c (pyglib_init): + return in case of error instead of trying to access the internal + types. + 2008-08-06 Paul Pogonyshev <pogonyshev@gmx.net> * gio/gio.override: Add 'pygio_do_icon_richcompare' prototype to diff --git a/glib/pyglib.c b/glib/pyglib.c index 3dd05a4..de8cbf9 100644 --- a/glib/pyglib.c +++ b/glib/pyglib.c @@ -63,9 +63,11 @@ pyglib_init(void) "could not import glib (error was: %s)", _PyUnicode_AsString(py_orig_exc)); Py_DECREF(py_orig_exc); - } else + } else { PyErr_SetString(PyExc_ImportError, "could not import glib (no error given)"); + } + return; } cobject = PyObject_GetAttrString(glib, "_PyGLib_API"); @@ -75,6 +77,7 @@ pyglib_init(void) PyErr_SetString(PyExc_ImportError, "could not import glib (could not find _PyGLib_API object)"); Py_DECREF(glib); + return; } _PyGMainContext_Type = (PyTypeObject*)PyObject_GetAttrString(glib, "MainContext"); |