Added timeout for call to get announcements from Github

This commit is contained in:
sourseas 2023-08-15 05:20:15 -07:00 committed by GitHub
parent 5c0af10a0b
commit 6a9f91450c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ def parse_announcement_dict(announcement_dict):
def get_announcements_to_file():
try:
r = requests.get("https://raw.githubusercontent.com/morpheus65535/bazarr-binaries/master/announcements.json")
r = requests.get(
"https://raw.githubusercontent.com/morpheus65535/bazarr-binaries/master/announcements.json"
timeout=10)
except requests.exceptions.HTTPError:
logging.exception("Error trying to get announcements from Github. Http error.")
except requests.exceptions.ConnectionError: