1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-18 20:40:43 +01:00

Better (read: some) error handling when the clementine module can't be imported

This commit is contained in:
David Sansome 2011-01-02 16:09:14 +00:00
parent 87627b3915
commit fdc2ec2e73

View File

@ -85,6 +85,14 @@ Script* PythonEngine::CreateScript(const QString& path,
// Get the clementine module so we can put stuff in it
clementine_module_ = PyImport_ImportModule("clementine");
if (!clementine_module_) {
AddLogLine("Failed to import the clementine module", true);
if (PyErr_Occurred()) {
PyErr_Print();
}
Py_Finalize();
return NULL;
}
sip_api_ = GetSIPApi();
// Add objects to the module