1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-16 17:47:23 +01:00

Fixed FURB118 (reimplemented-operator)

This commit is contained in:
Teal Dulcet
2025-01-08 05:09:23 -08:00
parent b1e094afe5
commit 9e33920db1
2 changed files with 4 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import rtyaml
from exclusiveprocess import Lock
from utils import load_environment, shell, wait_for_service
import operator
def backup_status(env):
# If backups are disabled, return no status.
@@ -91,7 +92,7 @@ def backup_status(env):
# Ensure the rows are sorted reverse chronologically.
# This is relied on by should_force_full() and the next step.
backups = sorted(backups.values(), key = lambda b : b["date"], reverse=True)
backups = sorted(backups.values(), key = operator.itemgetter("date"), reverse=True)
# Get the average size of incremental backups, the size of the
# most recent full backup, and the date of the most recent