diff options
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index c4f3bc4..3f9af0d 100644 --- a/redis/client.py +++ b/redis/client.py @@ -85,8 +85,12 @@ class Connection(object): except socket.error, e: if e.args[0] == errno.EPIPE: self.disconnect() + if isinstance(e.args, basestring): + errno, errmsg = 'UNKNOWN', e.args + else: + errno, errmsg = e.args raise ConnectionError("Error %s while writing to socket. %s." % \ - e.args) + (errno, errmsg)) def read(self, length=None): """ |