libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [2/9] libcloud git commit: Fix lint.
Date Thu, 14 Jan 2016 20:15:29 GMT
Fix lint.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d01e1419
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d01e1419
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d01e1419

Branch: refs/heads/trunk
Commit: d01e141993065a7b923947c6c3087b4f3dbea47b
Parents: a9acb7f
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Thu Jan 14 14:05:09 2016 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Thu Jan 14 14:05:09 2016 +0100

----------------------------------------------------------------------
 libcloud/httplib_ssl.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d01e1419/libcloud/httplib_ssl.py
----------------------------------------------------------------------
diff --git a/libcloud/httplib_ssl.py b/libcloud/httplib_ssl.py
index a447e50..61f1ac6 100644
--- a/libcloud/httplib_ssl.py
+++ b/libcloud/httplib_ssl.py
@@ -291,22 +291,25 @@ class LibcloudHTTPSConnection(httplib.HTTPSConnection, LibcloudBaseConnection):
             self._activate_http_proxy(sock=sock)
 
         try:
-            self.sock = ssl.wrap_socket(sock,
-                                        self.key_file,
-                                        self.cert_file,
-                                        cert_reqs=ssl.CERT_REQUIRED,
-                                        ca_certs=self.ca_cert,
-                                        ssl_version=libcloud.security.SSL_VERSION)
+            self.sock = ssl.wrap_socket(
+                sock,
+                self.key_file,
+                self.cert_file,
+                cert_reqs=ssl.CERT_REQUIRED,
+                ca_certs=self.ca_cert,
+                ssl_version=libcloud.security.SSL_VERSION)
         except Exception:
             exc_cls = sys.exc_info()[0]
             e = sys.exc_info()[1]
-
             exc_msg = str(e)
+
             # Re-throw an exception with a more friendly error message
             if 'connection reset by peer' in exc_msg.lower():
                 ssl_version = libcloud.security.SSL_VERSION
                 ssl_version = SSL_CONSTANT_TO_TLS_VERSION_MAP[ssl_version]
-                msg = UNSUPPORTED_TLS_VERSION_ERROR_MSG % (exc_msg, ssl_version)
+                msg = (UNSUPPORTED_TLS_VERSION_ERROR_MSG %
+                       (exc_msg, ssl_version))
+
                 new_e = exc_cls(msg)
                 new_e.original_exc = e
                 raise new_e


Mime
View raw message