libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1209975 - in /libcloud/branches/py3k/libcloud: common/base.py compute/base.py
Date Sat, 03 Dec 2011 18:44:31 GMT
Author: tomaz
Date: Sat Dec  3 18:44:31 2011
New Revision: 1209975

URL: http://svn.apache.org/viewvc?rev=1209975&view=rev
Log:
Update exception handling.

Modified:
    libcloud/branches/py3k/libcloud/common/base.py
    libcloud/branches/py3k/libcloud/compute/base.py

Modified: libcloud/branches/py3k/libcloud/common/base.py
URL: http://svn.apache.org/viewvc/libcloud/branches/py3k/libcloud/common/base.py?rev=1209975&r1=1209974&r2=1209975&view=diff
==============================================================================
--- libcloud/branches/py3k/libcloud/common/base.py (original)
+++ libcloud/branches/py3k/libcloud/common/base.py Sat Dec  3 18:44:31 2011
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import sys
 import ssl
 import time
 
@@ -488,10 +489,9 @@ class Connection(object):
             else:
                 self.connection.request(method=method, url=url, body=data,
                                         headers=headers)
-        #except ssl.SSLError, e:
         except ssl.SSLError:
-            raise ssl.SSLError()
-            #raise ssl.SSLError(str(e))
+            e = sys.exc_info()[1]
+            raise ssl.SSLError(str(e))
 
         if raw:
             response = self.rawResponseCls(connection=self)

Modified: libcloud/branches/py3k/libcloud/compute/base.py
URL: http://svn.apache.org/viewvc/libcloud/branches/py3k/libcloud/compute/base.py?rev=1209975&r1=1209974&r2=1209975&view=diff
==============================================================================
--- libcloud/branches/py3k/libcloud/compute/base.py (original)
+++ libcloud/branches/py3k/libcloud/compute/base.py Sat Dec  3 18:44:31 2011
@@ -17,6 +17,7 @@
 Provides base classes for working with drivers
 """
 
+import sys
 import time
 import hashlib
 import os
@@ -564,9 +565,8 @@ class NodeDriver(BaseDriver):
                                         ssh_client=ssh_client,
                                         max_tries=3)
         except Exception:
-        #except Exception, e:
-            #raise DeploymentError(node, e)
-            raise DeploymentError(node, None)
+            e = sys.exc_info()[1]
+            raise DeploymentError(node, e)
         return node
 
     def _wait_until_running(self, node, wait_period=3, timeout=600):



Mime
View raw message