summaryrefslogtreecommitdiff
path: root/glanceclient/common/https.py
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2014-12-19 12:49:17 +0000
committerJames Page <james.page@ubuntu.com>2014-12-19 13:01:32 +0000
commitb96f6130265797489e684a4bc123a7a1f5118d2c (patch)
tree002d762acdea53e295395d912b1866fc02deaf90 /glanceclient/common/https.py
parent0cdc947bf998c7f00a23c11bf1be4bc5929b7803 (diff)
downloadpython-glanceclient-b96f6130265797489e684a4bc123a7a1f5118d2c.tar.gz
Update HTTPS certificate handling for pep-0476
This pep (included in python 2.7.9) changes the behaviour of SSL certificate chain handling to be more py3 like. Include required new exception behaviour in the list of exceptions to translate under py2. https://github.com/python/peps/blob/master/pep-0476.txt Closes-Bug: 1404227 Change-Id: I7da1a13d1ec861a07fd96684d0431508a214a2c8
Diffstat (limited to 'glanceclient/common/https.py')
-rw-r--r--glanceclient/common/https.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/glanceclient/common/https.py b/glanceclient/common/https.py
index 6baa6af..e29ea66 100644
--- a/glanceclient/common/https.py
+++ b/glanceclient/common/https.py
@@ -149,7 +149,11 @@ class VerifiedHTTPSConnection(HTTPSConnection):
if six.PY3:
excp_lst = (TypeError, FileNotFoundError, ssl.SSLError)
else:
- excp_lst = ()
+ # NOTE(jamespage)
+ # Accomodate changes in behaviour for pep-0467, introduced
+ # in python 2.7.9.
+ # https://github.com/python/peps/blob/master/pep-0476.txt
+ excp_lst = (TypeError, IOError, ssl.SSLError)
try:
HTTPSConnection.__init__(self, host, port,
key_file=key_file,