summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Regier <garrettregier@gmail.com>2011-09-21 04:12:38 -0700
committerGarrett Regier <garrettregier@gmail.com>2011-09-21 04:12:38 -0700
commited7332ff34da22798b562eb95d8a017f2eed83e4 (patch)
tree34b14211c717b83785ea418611193292c280545b
parentcdb32f7f27864f663d75f3aad8da6767273f9c84 (diff)
downloadlibpeas-ed7332ff34da22798b562eb95d8a017f2eed83e4.tar.gz
Improve the Python plugin loader's warnings
-rw-r--r--loaders/python/peas-plugin-loader-python.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 334f2d3..d279209 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -402,8 +402,9 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
pygobject_init (PYGOBJECT_MAJOR_VERSION, PYGOBJECT_MINOR_VERSION, PYGOBJECT_MICRO_VERSION);
if (PyErr_Occurred ())
{
- g_warning ("Error initializing Python interpreter: could not "
- "import pygobject");
+ g_warning ("Error initializing Python Plugin Loader:"
+ "PyGObject initialization failed");
+ PyErr_Print ();
goto python_init_error;
}
@@ -417,8 +418,8 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
gettext = PyImport_ImportModule ("gettext");
if (gettext == NULL)
{
- g_warning ("Error initializing Python interpreter: could not "
- "import gettext");
+ g_warning ("Error initializing Python Plugin Loader: "
+ "failed to import gettext");
goto python_init_error;
}
@@ -441,7 +442,8 @@ python_init_error:
g_warning ("Please check the installation of all the Python related packages "
"required by libpeas and try again");
- PyErr_Clear ();
+ if (PyErr_Occurred ())
+ PyErr_Clear ();
return FALSE;
}