Fixed connection errors not raising immediately

This commit is contained in:
Josiah Baldwin
2025-01-08 13:26:04 -08:00
parent bb7cf17cd3
commit fe4c2fe874
2 changed files with 14 additions and 8 deletions

View File

@@ -2,7 +2,9 @@ class MeshCtrlError(Exception):
"""
Base class for Meshctrl errors
"""
pass
def __init__(self, message, *args, **kwargs):
self.message = message
super().__init__(message, *args, **kwargs)
class ServerError(MeshCtrlError):
"""
@@ -25,6 +27,7 @@ class FileTransferError(MeshCtrlError):
"""
def __init__(self, message, stats):
self.stats = stats
super().__init__(message)
class FileTransferCancelled(FileTransferError):
"""