Don't throw an error on missing metrics size

This commit is contained in:
deajan 2025-04-05 19:32:02 +02:00
parent a63437f18b
commit 3f1dfb0625

View file

@ -246,7 +246,7 @@ def restic_json_to_prometheus(
backup_too_small = False
if minimum_backup_size_error:
try:
if restic_json["total_bytes_processed"] < int(
if restic_json["total_bytes_processed"] and restic_json["total_bytes_processed"] < int(
BytesConverter(str(minimum_backup_size_error).replace(" ", "")).bytes
):
backup_too_small = True