mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Catch crash on no internet (#3246)
This commit is contained in:
parent
4b81c88794
commit
468febc434
@ -20,9 +20,13 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def get_latest_version() -> str:
|
def get_latest_version() -> str:
|
||||||
|
try:
|
||||||
request = requests.get(
|
request = requests.get(
|
||||||
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest"
|
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest"
|
||||||
)
|
)
|
||||||
|
except:
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
response = request.json()
|
response = request.json()
|
||||||
|
|
||||||
if request.ok and response and "tag_name" in response:
|
if request.ok and response and "tag_name" in response:
|
||||||
|
Loading…
Reference in New Issue
Block a user