From 8568388f29168c5fe0e22255aca86bf6f577239d Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Thu, 10 Oct 2013 13:20:00 +0200 Subject: [PATCH] cluster.health has a status key that should not be treated as http status --- elasticsearch/connection/memcached.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/connection/memcached.py b/elasticsearch/connection/memcached.py index 3504e649..ad1dd727 100644 --- a/elasticsearch/connection/memcached.py +++ b/elasticsearch/connection/memcached.py @@ -65,7 +65,7 @@ class MemcachedConnection(PoolingConnection): # try not to load the json every time if response and response[0] == '{' and ('"status"' in response or '"error"' in response): data = json.loads(response) - if 'status' in data: + if 'status' in data and data['status'].isdigit(): status = data['status'] elif 'error' in data: raise TransportError('N/A', data['error'])