diff --git a/scripts/Identify_Old_Issue_And_PR.py b/scripts/Identify_Old_Issue_And_PR.py index f2c418f6e9..cf6b36948f 100644 --- a/scripts/Identify_Old_Issue_And_PR.py +++ b/scripts/Identify_Old_Issue_And_PR.py @@ -51,7 +51,7 @@ def is_old_pull_request(issue): # Grab the list of open Issues/PR buffer = "Grab the list of open Issues/PR via the GitHub API...\n" -response = requests.get(ISSUE_API) +response = requests.get(ISSUE_API, timeout=30) if response.status_code != 200: print("Cannot load the list of Issues/PR content: HTTP %s received!" % response.status_code) sys.exit(1) @@ -91,7 +91,7 @@ def is_old_pull_request(issue): color = "warning" message = "{\"text\": \"Old PR and Issue identification watchdog\",\"attachments\": [ {\"fallback\": \"%s\",\"color\":\"%s\",\"title\": \"Status\",\"text\": \"%s\"}]}" % (color, buffer, buffer) request_headers = {"Content-Type": "application/json"} - response = requests.post(sys.argv[1], headers=request_headers, data=message) + response = requests.post(sys.argv[1], headers=request_headers, data=message, timeout=30) if response.status_code != 200: print("Cannot send notification to slack: HTTP %s received!" % response.status_code) sys.exit(2) \ No newline at end of file