changeset 25:a73463a6bf1c

Modern redis servers return 1 instead of 'OK'. Check for both.
author mcroydon
date Thu, 16 Dec 2010 17:30:20 +0000
parents 363a3d8bd466
children a8dd8994636f
files queues/backends/redisd.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/queues/backends/redisd.py	Thu Dec 16 16:46:17 2010 +0000
+++ b/queues/backends/redisd.py	Thu Dec 16 17:30:20 2010 +0000
@@ -63,7 +63,7 @@
     def write(self, value):
         try:
             resp = self._connection.rpush(self.name, value)
-            if resp == 'OK':
+            if resp in ('OK', 1):
                 return True
             else:
                 return False