From 96f08d7c48a27a77da41c912fa52513d15a98681 Mon Sep 17 00:00:00 2001 From: Andy McCurdy Date: Mon, 2 Jun 2014 13:38:36 -0700 Subject: need to detect READONLY errors in read_response, now send_command. real fix for #435 --- redis/sentinel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'redis/sentinel.py') diff --git a/redis/sentinel.py b/redis/sentinel.py index 0479690..2f30062 100644 --- a/redis/sentinel.py +++ b/redis/sentinel.py @@ -50,9 +50,9 @@ class SentinelManagedConnection(Connection): continue raise SlaveNotFoundError # Never be here - def send_command(self, *args): + def read_response(self): try: - super(SentinelManagedConnection, self).send_command(*args) + return super(SentinelManagedConnection, self).read_response() except ReadOnlyError: if self.connection_pool.is_master: # When talking to a master, a ReadOnlyError when likely -- cgit v1.2.1