From: Philippe Proulx Date: Wed, 9 Aug 2017 22:13:03 +0000 (-0400) Subject: Python plugin provider: log if Python interpreter is already initialized X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=13e4a3e3729d784654d6e84d42aac39fcb71a0fb;p=babeltrace.git Python plugin provider: log if Python interpreter is already initialized Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/python-plugin-provider/python-plugin-provider.c b/python-plugin-provider/python-plugin-provider.c index 26ada1ba..2cb5a733 100644 --- a/python-plugin-provider/python-plugin-provider.c +++ b/python-plugin-provider/python-plugin-provider.c @@ -99,9 +99,13 @@ void init_python(void) } if (!Py_IsInitialized()) { + BT_LOGI_STR("Python interpreter is not initialized: initializing Python interpreter."); Py_InitializeEx(0); BT_LOGI("Initialized Python interpreter: version=\"%s\"", Py_GetVersion()); + } else { + BT_LOGI("Python interpreter is already initialized: version=\"%s\"", + Py_GetVersion()); } py_bt2_py_plugin_mod = PyImport_ImportModule("bt2.py_plugin");