From b7c27f28617f6fb22491f23130669bcb302d8f34 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 7 Oct 2014 11:00:37 -0400 Subject: Move some exceptions into provider.common These are generically useful and can be rused as they are by other providers. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/providers/common.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ipsilon/providers/common.py') diff --git a/ipsilon/providers/common.py b/ipsilon/providers/common.py index b1968f4..6d454b5 100755 --- a/ipsilon/providers/common.py +++ b/ipsilon/providers/common.py @@ -34,6 +34,21 @@ class ProviderException(Exception, Log): return repr(self.message) +class AuthenticationError(ProviderException): + + def __init__(self, message, code): + super(AuthenticationError, self).__init__(message) + self.code = code + self._debug('%s [%s]' % (message, code)) + + +class InvalidRequest(ProviderException): + + def __init__(self, message): + super(InvalidRequest, self).__init__(message) + self._debug(message) + + class ProviderBase(PluginObject): def __init__(self, name, path): -- cgit