diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index 8a5053724..913289de8 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -1213,15 +1213,15 @@ class Plugin(object): class RestartNeedingPlugin(Plugin): pass -class PluginNeedsRestart(BaseException): +class PluginNeedsRestart(Exception): def __init__(self, name): - BaseException.__init__(self) + Exception.__init__(self) self.name = name self.message = "Plugin {name} cannot be enabled or disabled after system startup".format(**locals()) -class PluginLifecycleException(BaseException): +class PluginLifecycleException(Exception): def __init__(self, name, reason, message): - BaseException.__init__(self) + Exception.__init__(self) self.name = name self.reason = reason diff --git a/src/octoprint/printer/__init__.py b/src/octoprint/printer/__init__.py index e0989a936..0a4195da4 100644 --- a/src/octoprint/printer/__init__.py +++ b/src/octoprint/printer/__init__.py @@ -467,6 +467,6 @@ class PrinterCallback(object): """ pass -class UnknownScript(BaseException): +class UnknownScript(Exception): def __init__(self, name, *args, **kwargs): self.name = name diff --git a/src/octoprint/server/api/languages.py b/src/octoprint/server/api/languages.py index a3690f741..820089e47 100644 --- a/src/octoprint/server/api/languages.py +++ b/src/octoprint/server/api/languages.py @@ -143,5 +143,5 @@ def _validate_archive_name(name): raise InvalidLanguagePack("Provided language pack contains invalid name {name}".format(**locals())) -class InvalidLanguagePack(BaseException): +class InvalidLanguagePack(Exception): pass diff --git a/src/octoprint/slicing/exceptions.py b/src/octoprint/slicing/exceptions.py index 4d7891073..8a543e9fa 100644 --- a/src/octoprint/slicing/exceptions.py +++ b/src/octoprint/slicing/exceptions.py @@ -33,7 +33,7 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" -class SlicingException(BaseException): +class SlicingException(Exception): """ Base exception of all slicing related exceptions. """ @@ -73,7 +73,7 @@ class UnknownSlicer(SlicerException): SlicerException.__init__(self, slicer, *args, **kwargs) self.message = "No such slicer: {slicer}".format(slicer=slicer) -class ProfileException(BaseException): +class ProfileException(Exception): """ Base exception of all slicing profile related exceptions. @@ -86,7 +86,7 @@ class ProfileException(BaseException): Identifier of the profile for which the exception was raised. """ def __init__(self, slicer, profile, *args, **kwargs): - BaseException.__init__(self, *args, **kwargs) + Exception.__init__(self, *args, **kwargs) self.slicer = slicer self.profile = profile diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 14ca4f594..65c99025a 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1982,9 +1982,9 @@ class TypedQueue(queue.Queue): return item -class TypeAlreadyInQueue(BaseException): +class TypeAlreadyInQueue(Exception): def __init__(self, t, *args, **kwargs): - BaseException.__init__(self, *args, **kwargs) + Exception.__init__(self, *args, **kwargs) self.type = t