🐛 Initialize exception with provided message (#4625)

So we get actual message when exception happens like:

"octoprint.filemanager.storage.StorageError: /tmp/test is not a
valid directory"
This commit is contained in:
Arkadiusz Miśkiewicz authored and GitHub committed 2022-09-28 15:03:47 +02:00
1 parent bbd06a0212
commit b133eea894
1 file changed
+1 -2
+1 -2
View File
@@ -445,8 +445,7 @@ class StorageError(Exception):
NOT_EMPTY = "not_empty"
def __init__(self, message, code=None, cause=None):
BaseException.__init__(self)
self.message = message
Exception.__init__(self, message)
self.cause = cause
if code is None: