summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-30 17:56:14 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-01-30 17:56:14 +0100
commitf848cbfdcb808805f110c88df16068f59918fad8 (patch)
tree9d3ad58dd912cea32988f06cf083a3c99bb1012e
parent0d804601255f93356b217ea690a0dc672033ac4a (diff)
downloadredis-py-f848cbfdcb808805f110c88df16068f59918fad8.tar.gz
Integer replies may be of type long
-rw-r--r--redis/client.py2
-rw-r--r--redis/connection.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 7591482..e4d8b2c 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -123,7 +123,7 @@ class Redis(threading.local):
string_keys_to_dict(
# these return OK, or int if redis-server is >=1.3.4
'LPUSH RPUSH',
- lambda r: isinstance(r, int) and r or r == 'OK'
+ lambda r: isinstance(r, long) and r or r == 'OK'
),
string_keys_to_dict('ZSCORE ZINCRBY', float_or_none),
string_keys_to_dict(
diff --git a/redis/connection.py b/redis/connection.py
index d178452..3f65ccd 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -124,7 +124,7 @@ class PythonConnection(BaseConnection):
return response
# int value
elif byte == ':':
- return int(response)
+ return long(response)
# bulk response
elif byte == '$':
length = int(response)