SorteablePlugin => SortablePlugin
This commit is contained in:
parent
e4dd4483d4
commit
8abf152d40
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Reference in a new issue