From 5a25138a713d06fcc32e1e61e25846aedbfff811 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Wed, 14 Jun 2023 20:25:34 +0300 Subject: [PATCH] Round the timestamp value read from .vacuum file to prevent potential errors caused by float values --- frigate/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/app.py b/frigate/app.py index 02e657ce1..9d85f461e 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -196,7 +196,7 @@ class FrigateApp: if os.path.exists(f"{CONFIG_DIR}/.vacuum"): with open(f"{CONFIG_DIR}/.vacuum") as f: try: - timestamp = int(f.readline()) + timestamp = round(float(f.readline())) except Exception: timestamp = 0