diff options
| author | Haikel Guemar <hguemar@fedoraproject.org> | 2015-07-22 11:41:42 +0200 |
|---|---|---|
| committer | Haikel Guemar <hguemar@fedoraproject.org> | 2015-07-28 17:53:09 +0200 |
| commit | c41dcc9f4366429d952cc47853496d58d47b7511 (patch) | |
| tree | 97b917bdc6245a441eaf87cf3239781f34db829a /glanceclient/common/https.py | |
| parent | d9d586942bf3f78ba174eb5832f60d80a7c839ca (diff) | |
| download | python-glanceclient-c41dcc9f4366429d952cc47853496d58d47b7511.tar.gz | |
Fix failure to create glance https connection pool
Due to a typo in an attribute named, an Attribute error is raised
causing failure in connection to glance through HTTPS
Urllib3 PoolManager class has a connection_pool_kw attribute
but not connection_kw
Closes-Bug: #1479020
Change-Id: Id4d6a5bdcf971d09e80043fd2ab399e208fd931c
Diffstat (limited to 'glanceclient/common/https.py')
| -rw-r--r-- | glanceclient/common/https.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/glanceclient/common/https.py b/glanceclient/common/https.py index 30896e0..56ee0cd 100644 --- a/glanceclient/common/https.py +++ b/glanceclient/common/https.py @@ -162,15 +162,16 @@ class HTTPSAdapter(adapters.HTTPAdapter): return url def _create_glance_httpsconnectionpool(self, url): - kw = self.poolmanager.connection_kw + kw = self.poolmanager.connection_pool_kw # Parse the url to get the scheme, host, and port parsed = compat.urlparse(url) # If there is no port specified, we should use the standard HTTPS port port = parsed.port or 443 - pool = HTTPSConnectionPool(parsed.host, port, **kw) + host = parsed.netloc.rsplit(':', 1)[0] + pool = HTTPSConnectionPool(host, port, **kw) with self.poolmanager.pools.lock: - self.poolmanager.pools[(parsed.scheme, parsed.host, port)] = pool + self.poolmanager.pools[(parsed.scheme, host, port)] = pool return pool |
