From b0d3de0adaf4efd5df02c8da21f528743d94749a Mon Sep 17 00:00:00 2001 From: Will McGinnis Date: Thu, 3 Mar 2016 19:50:17 -0500 Subject: [PATCH] requested changes. --- elasticsearch/connection/http_requests.py | 3 +-- elasticsearch/connection/http_urllib3.py | 1 - elasticsearch/connection/pooling.py | 2 +- elasticsearch/connection_pool.py | 7 ++----- elasticsearch/transport.py | 1 - 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/elasticsearch/connection/http_requests.py b/elasticsearch/connection/http_requests.py index e7c4c215..88f0e119 100644 --- a/elasticsearch/connection/http_requests.py +++ b/elasticsearch/connection/http_requests.py @@ -91,5 +91,4 @@ class RequestsHttpConnection(Connection): """ Explicitly closes connections """ - self.session.close() - return True \ No newline at end of file + self.session.close() \ No newline at end of file diff --git a/elasticsearch/connection/http_urllib3.py b/elasticsearch/connection/http_urllib3.py index 963ef043..eb59051f 100644 --- a/elasticsearch/connection/http_urllib3.py +++ b/elasticsearch/connection/http_urllib3.py @@ -118,4 +118,3 @@ class Urllib3HttpConnection(Connection): Explicitly closes connection """ self.pool.close() - return True diff --git a/elasticsearch/connection/pooling.py b/elasticsearch/connection/pooling.py index de653c03..3115e7c2 100644 --- a/elasticsearch/connection/pooling.py +++ b/elasticsearch/connection/pooling.py @@ -29,5 +29,5 @@ class PoolingConnection(Connection): """ Explicitly close connection """ - return True + pass diff --git a/elasticsearch/connection_pool.py b/elasticsearch/connection_pool.py index eef5e6ad..3ec43edf 100644 --- a/elasticsearch/connection_pool.py +++ b/elasticsearch/connection_pool.py @@ -231,11 +231,9 @@ class ConnectionPool(object): """ Explicitly closes connections """ - for conn in self.connections: + for conn in self.orig_connections: conn.close() - return True - class DummyConnectionPool(ConnectionPool): def __init__(self, connections, **kwargs): if len(connections) != 1: @@ -253,8 +251,7 @@ class DummyConnectionPool(ConnectionPool): """ Explicitly closes connections """ - for conn in self.connections: - conn.close() + self.connection.close() def _noop(self, *args, **kwargs): pass diff --git a/elasticsearch/transport.py b/elasticsearch/transport.py index 4e07972f..ad2c9021 100644 --- a/elasticsearch/transport.py +++ b/elasticsearch/transport.py @@ -358,4 +358,3 @@ class Transport(object): Explcitly closes connections """ self.connection_pool.close() - return True