libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1337769 - in /libcloud/trunk/libcloud/compute: base.py types.py
Date Sun, 13 May 2012 04:03:46 GMT
Author: tomaz
Date: Sun May 13 04:03:46 2012
New Revision: 1337769

URL: http://svn.apache.org/viewvc?rev=1337769&view=rev
Log:
Add 'driver' attribute to the DeploymentError class. This patch has been
contributed by Jay Doane and is part of LIBCLOUD-192.
--Thi sline, and those below, will be ignored--

M    libcloud/compute/types.py
M    libcloud/compute/base.py

Modified:
    libcloud/trunk/libcloud/compute/base.py
    libcloud/trunk/libcloud/compute/types.py

Modified: libcloud/trunk/libcloud/compute/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/base.py?rev=1337769&r1=1337768&r2=1337769&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/base.py (original)
+++ libcloud/trunk/libcloud/compute/base.py Sun May 13 04:03:46 2012
@@ -607,7 +607,7 @@ class NodeDriver(BaseDriver):
                                         max_tries=max_tries)
         except Exception:
             e = sys.exc_info()[1]
-            raise DeploymentError(node, e)
+            raise DeploymentError(node=node, original_exception=e, driver=self)
 
         return node
 

Modified: libcloud/trunk/libcloud/compute/types.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/types.py?rev=1337769&r1=1337768&r2=1337769&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/types.py (original)
+++ libcloud/trunk/libcloud/compute/types.py Sun May 13 04:03:46 2012
@@ -151,16 +151,17 @@ class DeploymentError(LibcloudError):
 
     @ivar node: L{Node} on which this exception happened, you might want to call L{Node.destroy}
     """
-    def __init__(self, node, original_exception=None):
+    def __init__(self, node, original_exception=None, driver=None):
         self.node = node
         self.value = original_exception
+        self.driver = driver
 
     def __str__(self):
         return self.__repr__()
 
     def __repr__(self):
-        return (('<DeploymentError: node=%s, error=%s>'
-                % (self.node.id, str(self.value))))
+        return (('<DeploymentError: node=%s, error=%s, driver=%s>'
+                % (self.node.id, str(self.value), str(self.driver))))
 
 
 """Deprecated alias of L{DeploymentException}"""



Mime
View raw message