summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Colish <dcolish@gmail.com>2011-03-14 16:54:17 -0400
committerDan Colish <dcolish@gmail.com>2011-03-14 16:54:17 -0400
commit28970572fc1ccf96464be440363c87adf39bfc67 (patch)
treeb06558f324dd9134a852d88b9799e50671e14c62
parent2f772ba93d887a4c3b6cc5256168c7ab48e89409 (diff)
parent47d8b688fd75f6b5d047941a884fbc9a41be300b (diff)
downloadredis-py-28970572fc1ccf96464be440363c87adf39bfc67.tar.gz
Merge branch 'andy'
-rw-r--r--CHANGES3
-rw-r--r--redis/connection.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index d302860..f245772 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,9 @@
* Lock objects now store their timeout value as a float. This allows floats
to be used as timeout values. No changes to existing code required.
* WATCH now supports multiple keys. Thanks Rich Schumacher.
+ * Broke out some code that was Python 2.4 incompatible. redis-py should
+ now be useable on 2.4, but this hasn't actually been tested. Thanks
+ Dan Colish for the patch.
* 2.2.3
* Added support for Hiredis. To use, simply "pip install hiredis" or
"easy_install hiredis". Thanks for Pieter Noordhuis for the hiredis-py
diff --git a/redis/connection.py b/redis/connection.py
index 648f7a1..9bacb53 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -57,8 +57,8 @@ class BaseConnection(object):
except socket.error, e:
if e.args[0] == errno.EPIPE:
self.disconnect()
- if isinstance(e.args, basestring):
- _errno, errmsg = 'UNKNOWN', e.args
+ if len(e.args) == 1:
+ _errno, errmsg = 'UNKNOWN', e.args[0]
else:
_errno, errmsg = e.args
raise ConnectionError("Error %s while writing to socket. %s." % \