summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorRoey Prat <roey.prat@redislabs.com>2018-10-17 15:28:23 +0300
committerRoey Prat <roey.prat@redislabs.com>2018-10-28 12:12:54 +0200
commit07eacf3ba5e5f87bafe992a51e04971ee0fd8b12 (patch)
tree201e59462f49464a9538a328d98f1586a0c41acb /benchmarks
parent1f2eaf31f29e6003179404b23c6ae4ab187595b4 (diff)
downloadredis-py-07eacf3ba5e5f87bafe992a51e04971ee0fd8b12.tar.gz
pycodestyle changes in benchmarking
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/basic_operations.py1
-rw-r--r--benchmarks/command_packer_benchmark.py8
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 = []