summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2013-04-10 10:32:49 +0100
committerLucian Branescu Mihaila <lucian.branescu@gmail.com>2013-04-10 10:32:49 +0100
commita9a76239d44733738ab62b5ef5a350785cc1bfd9 (patch)
treee46ef25f18315c050c8decb3e530de6f7532fd82 /redis/connection.py
parent8063b1021718f1eb1ab87530358e70fb171f5cba (diff)
downloadredis-py-a9a76239d44733738ab62b5ef5a350785cc1bfd9.tar.gz
Catch exception, not anything (which could be KeyboardInterrupt).
Diffstat (limited to 'redis/connection.py')
-rw-r--r--redis/connection.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 93dbbe6..60dfde6 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -45,7 +45,7 @@ class PythonParser(object):
def __del__(self):
try:
self.on_disconnect()
- except:
+ except Exception:
pass
def on_connect(self, connection):
@@ -152,7 +152,7 @@ class HiredisParser(object):
def __del__(self):
try:
self.on_disconnect()
- except:
+ except Exception:
pass
def on_connect(self, connection):
@@ -217,7 +217,7 @@ class Connection(object):
def __del__(self):
try:
self.disconnect()
- except:
+ except Exception:
pass
def connect(self):
@@ -292,7 +292,7 @@ class Connection(object):
_errno, errmsg = e.args
raise ConnectionError("Error %s while writing to socket. %s." %
(_errno, errmsg))
- except:
+ except Exception:
self.disconnect()
raise
@@ -304,7 +304,7 @@ class Connection(object):
"Read the response from a previously sent command"
try:
response = self._parser.read_response()
- except:
+ except Exception:
self.disconnect()
raise
if isinstance(response, ResponseError):