From a053341558b5f627985cb0861c9c2697605a8cd1 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 6 Mar 2015 09:50:49 -0500 Subject: [PATCH] create a RegionMapError exception Signed-off-by: Alfredo Deza --- radosgw_agent/exceptions.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/radosgw_agent/exceptions.py b/radosgw_agent/exceptions.py index 477da53..f461c40 100644 --- a/radosgw_agent/exceptions.py +++ b/radosgw_agent/exceptions.py @@ -4,6 +4,7 @@ class AgentError(Exception): The actual base exception for the agent """ + class ClientException(AgentError): """ Historical base radosgw_agent client exception. @@ -14,6 +15,17 @@ class ClientException(AgentError): class NetworkError(AgentError): pass + +class RegionMapError(AgentError): + + def __init__(self, error): + self.error = error + + def __str__(self): + msg = 'Could not retrieve region map from destination: %s' + return msg % self.error + + class InvalidProtocol(ClientException): pass -- 2.47.3