fix: call _resolve_pre_update_backup_mode directly in the receipt classifier

The resolver only does getattr() on args and already swallows its own
config-load errors, so the try/except around it could never fire; drop it
(review follow-up, no behaviour change).
This commit is contained in:
teknium1
2026-09-18 03:57:59 -07:00
committed by Teknium
parent 69b63e7407
commit be98c68fa3

View File

@@ -174,11 +174,7 @@ def _record_pre_update_backup_outcome(args, snapshot_id) -> None:
if snapshot_id:
_record_update_step("pre_update_backup", True, f"snapshot={snapshot_id}")
return
try:
mode = _resolve_pre_update_backup_mode(args)
except Exception:
mode = ""
if mode == "off":
if _resolve_pre_update_backup_mode(args) == "off":
reason = ("disabled by --no-backup" if getattr(args, "no_backup", False)
else "disabled by updates.pre_update_backup (mode: off)")
_record_update_skip("pre_update_backup", reason)