diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2014-06-02 13:38:36 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2014-06-02 13:38:36 -0700 |
commit | 96f08d7c48a27a77da41c912fa52513d15a98681 (patch) | |
tree | 75c5d130668ba6ed796a7a396cc9a1ec66572620 /redis/sentinel.py | |
parent | 2114574b1e52448cfdbc08f3f837e87efb753497 (diff) | |
download | redis-py-96f08d7c48a27a77da41c912fa52513d15a98681.tar.gz |
need to detect READONLY errors in read_response, now send_command. real fix
for #435
Diffstat (limited to 'redis/sentinel.py')
-rw-r--r-- | redis/sentinel.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |