summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index d77ef01..35d2cfe 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -389,11 +389,12 @@ def parse_zscan(response, **options):
def parse_slowlog_get(response, **options):
+ space = ' ' if options.get('decode_responses', False) else b' '
return [{
'id': item[0],
'start_time': int(item[1]),
'duration': int(item[2]),
- 'command': b' '.join(item[3])
+ 'command': space.join(item[3])
} for item in response]
@@ -1195,7 +1196,9 @@ class Redis(object):
args = ['SLOWLOG GET']
if num is not None:
args.append(num)
- return self.execute_command(*args)
+ decode_responses = self.connection_pool.connection_kwargs.get(
+ 'decode_responses', False)
+ return self.execute_command(*args, decode_responses=decode_responses)
def slowlog_len(self):
"Get the number of items in the slowlog"