From 2a76e66deac07a8da6380f47280e454ca2efc6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Sat, 18 Jan 2014 21:29:26 +0100 Subject: [PATCH] Thrift is not lazy during opening connection we need to look out for exceptions even when requesting one --- elasticsearch/connection/thrift.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/connection/thrift.py b/elasticsearch/connection/thrift.py index cce12f9f..7f97199d 100644 --- a/elasticsearch/connection/thrift.py +++ b/elasticsearch/connection/thrift.py @@ -56,8 +56,8 @@ class ThriftConnection(PoolingConnection): parameters=params, body=body) start = time.time() - tclient = self._get_connection() try: + tclient = self._get_connection() response = tclient.execute(request) duration = time.time() - start except TException as e: