mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Round the timestamp value read from .vacuum file to prevent potential errors caused by float values (#6800)
This commit is contained in:
parent
ff1b5c87aa
commit
3efa77f302
@ -196,7 +196,7 @@ class FrigateApp:
|
|||||||
if os.path.exists(f"{CONFIG_DIR}/.vacuum"):
|
if os.path.exists(f"{CONFIG_DIR}/.vacuum"):
|
||||||
with open(f"{CONFIG_DIR}/.vacuum") as f:
|
with open(f"{CONFIG_DIR}/.vacuum") as f:
|
||||||
try:
|
try:
|
||||||
timestamp = int(f.readline())
|
timestamp = round(float(f.readline()))
|
||||||
except Exception:
|
except Exception:
|
||||||
timestamp = 0
|
timestamp = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user