Splits exceptions in common + client

This commit is contained in:
Sergi Delgado Segura
2020-04-09 17:49:46 +02:00
parent b3841c1da6
commit 80e72f089d
4 changed files with 44 additions and 48 deletions

View File

@@ -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"""