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:
parent
87627b3915
commit
fdc2ec2e73
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user