mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Catch case where github sends bad json data (#13077)
This commit is contained in:
parent
6b9082bdd9
commit
dbd042ca3e
@ -4,6 +4,7 @@ import asyncio
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
from json import JSONDecodeError
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
@ -35,7 +36,7 @@ def get_latest_version(config: FrigateConfig) -> str:
|
|||||||
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest",
|
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest",
|
||||||
timeout=10,
|
timeout=10,
|
||||||
)
|
)
|
||||||
except RequestException:
|
except (RequestException, JSONDecodeError):
|
||||||
return "unknown"
|
return "unknown"
|
||||||
|
|
||||||
response = request.json()
|
response = request.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user