Set a timeout on github release check (#3969)

* Set a timeout on github release check

* Formatting
This commit is contained in:
Nicolas Mowen 2022-10-01 07:58:23 -06:00 committed by GitHub
parent 3846a13805
commit 53f7190d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,8 @@ logger = logging.getLogger(__name__)
def get_latest_version() -> str:
try:
request = requests.get(
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest"
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest",
timeout=10,
)
except:
return "unknown"