From 468febc4340efe05dde7aaf30a9f47807a313ec9 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 26 May 2022 09:04:33 -0600 Subject: [PATCH] Catch crash on no internet (#3246) --- frigate/stats.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frigate/stats.py b/frigate/stats.py index 4bbd5d6df..7e910b6d4 100644 --- a/frigate/stats.py +++ b/frigate/stats.py @@ -20,9 +20,13 @@ logger = logging.getLogger(__name__) def get_latest_version() -> str: - request = requests.get( - "https://api.github.com/repos/blakeblackshear/frigate/releases/latest" - ) + try: + request = requests.get( + "https://api.github.com/repos/blakeblackshear/frigate/releases/latest" + ) + except: + return "unknown" + response = request.json() if request.ok and response and "tag_name" in response: