Added timeout for call to get announcements from Github

pull/2230/head
sourseas 1 year ago committed by GitHub
parent 5c0af10a0b
commit 6a9f91450c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,7 +43,9 @@ def parse_announcement_dict(announcement_dict):
def get_announcements_to_file(): def get_announcements_to_file():
try: 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: except requests.exceptions.HTTPError:
logging.exception("Error trying to get announcements from Github. Http error.") logging.exception("Error trying to get announcements from Github. Http error.")
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:

Loading…
Cancel
Save