Python plugin provider: log if Python interpreter is already initialized
[babeltrace.git] / python-plugin-provider / python-plugin-provider.c
index 26ada1ba85608e045d3bd38390aada4886dd3ad9..2cb5a7334f82169b608d557180875e9f619dd3ec 100644 (file)
@@ -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");
This page took 0.023257 seconds and 4 git commands to generate.