From e3e97699a0d37bdf1c8a37e468480d2b9d98a861 Mon Sep 17 00:00:00 2001 From: Andy McCurdy Date: Sat, 1 Jun 2019 15:55:34 -0700 Subject: don't rewrite ConnectionErrors as they might be subclasses. just fall back to the except-anything handler --- redis/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/connection.py b/redis/connection.py index b3c772e..02186b2 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -645,7 +645,7 @@ class Connection(object): self.disconnect() raise TimeoutError("Timeout reading from %s:%s" % (self.host, self.port)) - except (socket.error, ConnectionError): + except socket.error: self.disconnect() e = sys.exc_info()[1] raise ConnectionError("Error while reading from %s:%s : %s" % -- cgit v1.2.1