admin: fix chronological sort of logging files (#39363)

This commit is contained in:
Frédéric Péters 2020-01-29 10:50:18 +01:00
parent 8b51e62e1e
commit 6f06588a86
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class LoggerDirectory(Directory):
r += htmltext('<form id="other-log-select">')
r += _('Select another logfile:')
r += htmltext('<select name="logfile">')
options.sort(lambda x,y: cmp(x['date'], y['date']))
options.sort(key=lambda x: x['date'])
options.reverse()
for option in options:
option['since'] = str(_('Since: %s') % option['date'])[:-4]