Python plugin provider: log if Python interpreter is already initialized
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 9 Aug 2017 22:13:03 +0000 (18:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Aug 2017 18:46:41 +0000 (14:46 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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.02493 seconds and 4 git commands to generate.