Skip to content
Snippets Groups Projects
Commit 8fb48790 authored by inso's avatar inso
Browse files

Fix error on startup when no plugin loaded

parent 984cd12e
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ class PluginsDirectory:
plugin_module,
with_plugin)
except ImportError as e:
self.with_plugin = Plugin(module_name, "", "", False, None, with_plugin)
self._logger.debug(str(e) + " with sys.path " + str(sys.path))
except OSError as e:
self._logger.debug(str(e))
......
......@@ -11,6 +11,8 @@ class MainWindowModel(QObject):
self.app = app
def load_plugins(self, main_window):
for plugin in self.app.plugins_dir.plugins + [self.app.plugins_dir.with_plugin]:
for plugin in self.app.plugins_dir.plugins:
if plugin.imported:
plugin.module.plugin_exec(self.app, main_window)
if self.app.plugins_dir.with_plugin:
self.app.plugins_dir.with_plugin.module.plugin_exec(self.app, main_window)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment