Skip to content

Commit

Permalink
Cleanup command mangling code. Fixes py3 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Jan 20, 2015
1 parent 78aa0af commit 4f299dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/redisboard/admin.py
Expand Up @@ -38,11 +38,10 @@ class Media:
def slowlog(self, obj):
output = [(float('inf'), 'Total: %d items' % obj.slowlog_len())]
for log in obj.slowlog_get():
command = ' '.join(l.decode('utf-8', 'replace')
for l in log['command'])
command = log['command']

if command[100:]:
command = command[:97] + '...'
if len(command) > 255:
command = command[:252] + '...'

output.append((
log['duration'],
Expand Down

0 comments on commit 4f299dc

Please sign in to comment.