[libpeas] Only disable python warning redirections when not initialized
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Only disable python warning redirections when not initialized
- Date: Wed, 13 Nov 2013 08:36:25 +0000 (UTC)
commit ef1d7f6ae4aa5733bcbb21ed6f0b8bc5c210059e
Author: Garrett Regier <garrettregier gmail com>
Date: Tue Nov 12 22:54:01 2013 -0800
Only disable python warning redirections when not initialized
Python programs would want them to still be redirected.
loaders/python/peas-plugin-loader-python.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 059c626..b7a5881 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -459,7 +459,9 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
pyg_enable_threads ();
PyEval_InitThreads ();
- pyg_disable_warning_redirections ();
+ /* Only redirect warnings when python was not already initialized */
+ if (!pyloader->priv->must_finalize_python)
+ pyg_disable_warning_redirections ();
/* i18n support */
gettext = PyImport_ImportModule ("gettext");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]