cluster.health has a status key that should not be treated as http status

This commit is contained in:
Honza Kral
2013-10-10 13:20:00 +02:00
parent c9f21c3c4f
commit 8568388f29
+1 -1
View File
@@ -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'])