Add a sorting lambda function when sorting the backups list (#562)

* Add a sorting lambda function when sorting the backups list

* Update backup.py
This commit is contained in:
Julien Osman 2018-10-24 21:57:56 +02:00 committed by Alexandre Aubin
parent 8691017b46
commit a16b6f08f5

View file

@ -2187,7 +2187,7 @@ def backup_list(with_info=False, human_readable=False):
except ValueError:
continue
result.append(name)
result.sort()
result.sort(key=lambda x: os.path.getctime(os.path.join(ARCHIVES_PATH, x+".tar.gz")))
if result and with_info:
d = OrderedDict()