mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 06:04:21 +01:00
Splits exceptions in common + client
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
class InvalidParameter(ValueError):
|
||||
"""Raised when a command line parameter is invalid (either missing or wrong)"""
|
||||
|
||||
def __init__(self, msg, **kwargs):
|
||||
self.reason = msg
|
||||
self.kwargs = kwargs
|
||||
from common.exceptions import BasicException
|
||||
|
||||
|
||||
class InvalidKey(Exception):
|
||||
"""Raised when there is an error loading the keys"""
|
||||
|
||||
def __init__(self, msg, **kwargs):
|
||||
self.reason = msg
|
||||
self.kwargs = kwargs
|
||||
|
||||
|
||||
class TowerResponseError(Exception):
|
||||
class TowerConnectionError(BasicException):
|
||||
"""Raised when the tower responds with an error"""
|
||||
|
||||
def __init__(self, msg, **kwargs):
|
||||
self.reason = msg
|
||||
self.kwargs = kwargs
|
||||
|
||||
class TowerResponseError(BasicException):
|
||||
"""Raised when the tower responds with an error"""
|
||||
|
||||
Reference in New Issue
Block a user