From 6ccff71408c0c7a8aca1074e97ecc8b4a6f7cf06 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 28 Aug 2021 07:43:51 -0500 Subject: [PATCH] handle missing camera names --- frigate/record.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/record.py b/frigate/record.py index e1aed08f1..2ceda3652 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -78,7 +78,10 @@ class RecordingMaintainer(threading.Thread): start_time = datetime.datetime.strptime(date, "%Y%m%d%H%M%S") # Just delete files if recordings are turned off - if not self.config.cameras[camera].record.enabled: + if ( + not camera in self.config.cameras + or not self.config.cameras[camera].record.enabled + ): Path(cache_path).unlink(missing_ok=True) continue