diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2011-05-25 12:18:38 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2011-05-25 12:18:38 -0700 |
commit | b0cc6b9662ac73a2083d18aa7c26f38ca3f5316b (patch) | |
tree | 9b33093730c1bebb82815584887c627ff6a3cbee /redis/client.py | |
parent | e2b6a8068bef111f13834ee298d7d931a1070773 (diff) | |
download | redis-py-b0cc6b9662ac73a2083d18aa7c26f38ca3f5316b.tar.gz |
ConnectionPool's get_connection() now can take optional kwargs
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py index a87e082..601965f 100644 --- a/redis/client.py +++ b/redis/client.py @@ -216,8 +216,9 @@ class Redis(object): #### COMMAND EXECUTION AND PROTOCOL PARSING #### def execute_command(self, *args, **options): "Execute a command and return a parsed response" + pool = self.connection_pool command_name = args[0] - connection = self.connection_pool.get_connection(command_name) + connection = pool.get_connection(command_name, **options) try: connection.send_command(*args) return self.parse_response(connection, command_name, **options) @@ -226,7 +227,7 @@ class Redis(object): connection.send_command(*args) return self.parse_response(connection, command_name, **options) finally: - self.connection_pool.release(connection) + pool.release(connection) def parse_response(self, connection, command_name, **options): "Parses a response from the Redis server" |