mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Catch missing file
This commit is contained in:
parent
6d0c1da1a8
commit
ad4a3dc29c
@ -6,6 +6,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from typing import Any, Optional
|
||||
|
||||
import cv2
|
||||
@ -538,4 +539,4 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
||||
|
||||
# delete oldest face image if maximum is reached
|
||||
if len(files) > self.config.face_recognition.save_attempts:
|
||||
os.unlink(os.path.join(folder, files[-1]))
|
||||
Path(os.path.join(folder, files[-1])).unlink(missing_ok=True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user