1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-04-15 23:47:24 +02:00

Fixed FURB118 (reimplemented-operator)

This commit is contained in:
Teal Dulcet
2025-06-18 04:17:27 -07:00
parent c64a24e870
commit 68fd3dc535
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