diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index 69611bed..028ba436 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -1071,7 +1071,7 @@ class PluginManager(object): def sort_func(impl): sorting_value = None - if sorting_context is not None and isinstance(impl[1], SorteablePlugin): + if sorting_context is not None and isinstance(impl[1], SortablePlugin): try: sorting_value = impl[1].get_sorting_key(sorting_context) except: @@ -1281,7 +1281,7 @@ class Plugin(object): class RestartNeedingPlugin(Plugin): pass -class SorteablePlugin(Plugin): +class SortablePlugin(Plugin): def get_sorting_key(self, context=None): return None diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index ea11406a..9fdbe024 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -18,7 +18,7 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" -from .core import (Plugin, RestartNeedingPlugin, SorteablePlugin) +from .core import (Plugin, RestartNeedingPlugin, SortablePlugin) class OctoPrintPlugin(Plugin): @@ -99,7 +99,7 @@ class OctoPrintPlugin(Plugin): class ReloadNeedingPlugin(Plugin): pass -class StartupPlugin(OctoPrintPlugin, SorteablePlugin): +class StartupPlugin(OctoPrintPlugin, SortablePlugin): """ The ``StartupPlugin`` allows hooking into the startup of OctoPrint. It can be used to start up additional services on or just after the startup of the server. @@ -127,7 +127,7 @@ class StartupPlugin(OctoPrintPlugin, SorteablePlugin): pass -class ShutdownPlugin(OctoPrintPlugin, SorteablePlugin): +class ShutdownPlugin(OctoPrintPlugin, SortablePlugin): """ The ``ShutdownPlugin`` allows hooking into the shutdown of OctoPrint. It's usually used in conjunction with the :class:`StartupPlugin` mixin, to cleanly shut down additional services again that where started by the :class:`StartupPlugin`