Catch crash on no internet (#3246)

This commit is contained in:
Nicolas Mowen 2022-05-26 09:04:33 -06:00 committed by GitHub
parent 4b81c88794
commit 468febc434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,13 @@ logger = logging.getLogger(__name__)
def get_latest_version() -> str:
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: