diff options
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-x | redis/connection.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/redis/connection.py b/redis/connection.py index b5e3fb1..dbcf332 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -288,10 +288,7 @@ class PythonParser(BaseParser): self._buffer = None def __del__(self): - try: - self.on_disconnect() - except Exception: - pass + self.on_disconnect() def on_connect(self, connection): "Called when the socket connects" @@ -370,10 +367,7 @@ class HiredisParser(BaseParser): self._buffer = bytearray(socket_read_size) def __del__(self): - try: - self.on_disconnect() - except Exception: - pass + self.on_disconnect() def on_connect(self, connection): self._sock = connection._sock @@ -533,10 +527,7 @@ class Connection(object): return pieces def __del__(self): - try: - self.disconnect() - except Exception: - pass + self.disconnect() def register_connect_callback(self, callback): self._connect_callbacks.append(callback) |