diff --git a/nutcase/app/app/api/api_utils.py b/nutcase/app/app/api/api_utils.py index 941e950..c350ad7 100644 --- a/nutcase/app/app/api/api_utils.py +++ b/nutcase/app/app/api/api_utils.py @@ -16,7 +16,7 @@ def Get_Update_String(): Result = "" try: URL = current_app.config['GITHUB_API_URL'] + "releases" - Response = urllib.request.urlopen(URL) + Response = urllib.request.urlopen(URL, timeout=3) HTTP_Code = Response.getcode() if HTTP_Code != HTTPStatus.OK: current_app.logger.warning("Github returned {}: {}".format( diff --git a/nutcase/app/app/utils/webhook.py b/nutcase/app/app/utils/webhook.py index 25a82ca..3007ce5 100644 --- a/nutcase/app/app/utils/webhook.py +++ b/nutcase/app/app/utils/webhook.py @@ -9,7 +9,7 @@ # ================================================================================================== def Call_URL(app, URL): try: - Response = urllib.request.urlopen(URL) + Response = urllib.request.urlopen(URL, timeout=3) HTTP_Code = Response.getcode() if HTTP_Code != HTTPStatus.OK: app.logger.warning("WebHook returned {}: {}".format(