Loading openflexure_microscope/plugins/loader.py +13 −12 Original line number Diff line number Diff line Loading @@ -91,8 +91,7 @@ class PluginMount(object): Args: plugin_module: A loaded module to be attached. Module can be loaded using :py:meth:`openflexure_microscope.plugins.load_plugin` """ if not hasattr(plugin_module, 'PLUGINS') or not isinstance(plugin_module.PLUGINS, dict): raise Exception("No falid PLUGINS dictionary found in {}".format(plugin_module)) if hasattr(plugin_module, 'PLUGINS') and isinstance(plugin_module.PLUGINS, dict): for plugin_name, plugin_class in plugin_module.PLUGINS.items(): Loading @@ -107,6 +106,8 @@ class PluginMount(object): plugin_object.microscope = self.parent print("Adding plugin: {}".format(plugin_name)) else: warnings.warn("No valid PLUGINS dictionary found in {}".format(plugin_module)) class MicroscopePlugin(): Loading Loading
openflexure_microscope/plugins/loader.py +13 −12 Original line number Diff line number Diff line Loading @@ -91,8 +91,7 @@ class PluginMount(object): Args: plugin_module: A loaded module to be attached. Module can be loaded using :py:meth:`openflexure_microscope.plugins.load_plugin` """ if not hasattr(plugin_module, 'PLUGINS') or not isinstance(plugin_module.PLUGINS, dict): raise Exception("No falid PLUGINS dictionary found in {}".format(plugin_module)) if hasattr(plugin_module, 'PLUGINS') and isinstance(plugin_module.PLUGINS, dict): for plugin_name, plugin_class in plugin_module.PLUGINS.items(): Loading @@ -107,6 +106,8 @@ class PluginMount(object): plugin_object.microscope = self.parent print("Adding plugin: {}".format(plugin_name)) else: warnings.warn("No valid PLUGINS dictionary found in {}".format(plugin_module)) class MicroscopePlugin(): Loading