diff options
-rw-r--r-- | benchmarks/basic_operations.py | 1 | ||||
-rw-r--r-- | benchmarks/command_packer_benchmark.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/benchmarks/basic_operations.py b/benchmarks/basic_operations.py index 2f1e9f4..c50a610 100644 --- a/benchmarks/basic_operations.py +++ b/benchmarks/basic_operations.py @@ -195,5 +195,6 @@ def hmset(conn, num, pipeline_size, data_size): if pipeline_size > 1: conn.execute() + if __name__ == '__main__': run() diff --git a/benchmarks/command_packer_benchmark.py b/benchmarks/command_packer_benchmark.py index 49f48f2..9eb1853 100644 --- a/benchmarks/command_packer_benchmark.py +++ b/benchmarks/command_packer_benchmark.py @@ -22,9 +22,9 @@ class StringJoiningConnection(Connection): _errno, errmsg = e.args raise ConnectionError("Error %s while writing to socket. %s." % (_errno, errmsg)) - except: + except Exception as e: self.disconnect() - raise + raise e def pack_command(self, *args): "Pack a series of arguments into a value Redis command" @@ -54,9 +54,9 @@ class ListJoiningConnection(Connection): _errno, errmsg = e.args raise ConnectionError("Error %s while writing to socket. %s." % (_errno, errmsg)) - except: + except Exception as e: self.disconnect() - raise + raise e def pack_command(self, *args): output = [] |