diff options
author | Roey Prat <roey.prat@redislabs.com> | 2018-10-17 15:36:04 +0300 |
---|---|---|
committer | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 12:12:54 +0200 |
commit | 04784cb2ecb0847198aaf64102e5129868c17da6 (patch) | |
tree | 2495cbb9fe7eccf915d9e6d4492b7baa06a74ff5 /redis/connection.py | |
parent | 07eacf3ba5e5f87bafe992a51e04971ee0fd8b12 (diff) | |
download | redis-py-04784cb2ecb0847198aaf64102e5129868c17da6.tar.gz |
pycodestyle fixes in client
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-x | redis/connection.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/redis/connection.py b/redis/connection.py index 6ad467a..1190260 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -236,7 +236,7 @@ class SocketBuffer(object): try: self.purge() self._buffer.close() - except: + except Exception: # issue #633 suggests the purge/close somehow raised a # BadFileDescriptor error. Perhaps the client ran out of # memory or something else? It's probably OK to ignore @@ -602,9 +602,9 @@ class Connection(object): errmsg = e.args[1] raise ConnectionError("Error %s while writing to socket. %s." % (errno, errmsg)) - except: + except Exception as e: self.disconnect() - raise + raise e def send_command(self, *args): "Pack and send a command to the Redis server" @@ -623,9 +623,9 @@ class Connection(object): "Read the response from a previously sent command" try: response = self._parser.read_response() - except: + except Exception as e: self.disconnect() - raise + raise e if isinstance(response, ResponseError): raise response return response |