]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
create a RegionMapError exception
authorAlfredo Deza <adeza@redhat.com>
Fri, 6 Mar 2015 14:50:49 +0000 (09:50 -0500)
committerAlfredo Deza <adeza@redhat.com>
Fri, 6 Mar 2015 14:50:49 +0000 (09:50 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/exceptions.py

index 477da53e9c1bb550dbc21ec2ea9460670943f6ed..f461c4097e02917befdcfc49a91c2fc9f235f428 100644 (file)
@@ -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