[libpeas] Require gi in python loader
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Require gi in python loader
- Date: Sun, 27 Jun 2010 13:44:30 +0000 (UTC)
commit 03d05ae4c064f64b73cec6949783d8be513c0b82
Author: Garrett Regier <alias301 gmail com>
Date: Sun Jun 27 03:23:28 2010 -0700
Require gi in python loader
https://bugzilla.gnome.org/show_bug.cgi?id=622890
loaders/python/peas-plugin-loader-python.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 7d5f610..9de24c7 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -362,7 +362,7 @@ peas_init_pygobject (void)
static gboolean
peas_python_init (PeasPluginLoaderPython *loader)
{
- PyObject *mdict, *gobject, *gettext, *install, *gettext_args;
+ PyObject *mdict, *gobject, *gi, *gettext, *install, *gettext_args;
char *argv[] = { "libpeas", NULL };
if (loader->priv->init_failed)
@@ -417,6 +417,15 @@ peas_python_init (PeasPluginLoaderPython *loader)
goto python_init_error;
}
+ gi = PyImport_ImportModule ("gi");
+ if (gi == NULL)
+ {
+ g_warning ("Error initializing Python interpreter: could not "
+ "import gi.");
+
+ goto python_init_error;
+ }
+
/* i18n support */
gettext = PyImport_ImportModule ("gettext");
if (gettext == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]