aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src/proxy/proxypython.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/plugin_python/src/proxy/proxypython.cpp')
-rw-r--r--libs/plugin_python/src/proxy/proxypython.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/plugin_python/src/proxy/proxypython.cpp b/libs/plugin_python/src/proxy/proxypython.cpp
index 196bf23..c9c7ba2 100644
--- a/libs/plugin_python/src/proxy/proxypython.cpp
+++ b/libs/plugin_python/src/proxy/proxypython.cpp
@@ -224,6 +224,9 @@ bool ProxyPython::init(IOrganizer* moInfo)
if (!m_Runner || !m_Runner->isInitialized()) {
m_LoadFailure = FailureType::INITIALIZATION;
+ MOBase::log::error("Python proxy: interpreter failed to initialize, "
+ "Python plugins will be unavailable");
+ return true; // return true so the plugin stays loaded (shows diagnostic)
}
else {
m_Runner->addDllSearchPath(pluginDataRoot / "dlls");
@@ -296,7 +299,7 @@ QStringList ProxyPython::pluginList(const QDir& pluginPath) const
QList<QObject*> ProxyPython::load(const QString& identifier)
{
- if (!m_Runner) {
+ if (!m_Runner || !m_Runner->isInitialized()) {
return {};
}
return m_Runner->load(identifier);
@@ -304,7 +307,7 @@ QList<QObject*> ProxyPython::load(const QString& identifier)
void ProxyPython::unload(const QString& identifier)
{
- if (m_Runner) {
+ if (m_Runner && m_Runner->isInitialized()) {
return m_Runner->unload(identifier);
}
}