From d97fa99ec5e0a159df2b1d5795c09672d4096ed4 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 24 Feb 2023 18:13:33 -0700 Subject: [PATCH] Fix logging for corrupt segments (#5582) * Fix logging for corrupt segments * Formatting --- frigate/record.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/record.py b/frigate/record.py index 4b7a25a7c..7693db914 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -171,10 +171,12 @@ class RecordingMaintainer(threading.Thread): else: if duration == -1: logger.warning( - f"Failed to probe corrupt segment {f}: {p.returncode} - {p.stderr}" + f"Failed to probe corrupt segment {cache_path}: {p.returncode} - {p.stderr}" ) - logger.warning(f"Discarding a corrupt recording segment: {f}") + logger.warning( + f"Discarding a corrupt recording segment: {cache_path}" + ) Path(cache_path).unlink(missing_ok=True) continue