------------------------------------------------------------ revno: 36 committer: poy <p...@123gen.com> branch nick: dc-plugin-sdk timestamp: Fri 2014-07-04 00:12:56 +0200 message: Log a Python import error modified: Libraries/PythonPlugin/PythonManagement.cpp
-- lp:dc-plugin-sdk https://code.launchpad.net/~dcplusplus-team/dc-plugin-sdk/trunk Your team Dcplusplus-team is subscribed to branch lp:dc-plugin-sdk. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dc-plugin-sdk/trunk/+edit-subscription
=== modified file 'Libraries/PythonPlugin/PythonManagement.cpp' --- Libraries/PythonPlugin/PythonManagement.cpp 2014-06-30 18:28:14 +0000 +++ Libraries/PythonPlugin/PythonManagement.cpp 2014-07-03 22:12:56 +0000 @@ -109,6 +109,11 @@ PyObject* pModuleName = CMarshalling::GetStringValue(strModuleName); PyObject* pModule = PyImport_Import(pModuleName); + if (!pModule) { + printf("Could not load the Python module %s\n", strModuleName.c_str()); + // todo: throw + return nullptr; + } PyObject* pDict = PyModule_GetDict(pModule);
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp