File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -749,7 +749,7 @@ def main():
749
749
750
750
# Check for newer version of Sherlock. If it exists, let the user know about it
751
751
try :
752
- latest_release_raw = requests .get (forge_api_latest_release ).text
752
+ latest_release_raw = requests .get (forge_api_latest_release , timeout = 10 ).text
753
753
latest_release_json = json_loads (latest_release_raw )
754
754
latest_remote_tag = latest_release_json ["tag_name" ]
755
755
@@ -809,7 +809,7 @@ def main():
809
809
if args .json_file .isnumeric ():
810
810
pull_number = args .json_file
811
811
pull_url = f"https://api.github.com/repos/sherlock-project/sherlock/pulls/{ pull_number } "
812
- pull_request_raw = requests .get (pull_url ).text
812
+ pull_request_raw = requests .get (pull_url , timeout = 10 ).text
813
813
pull_request_json = json_loads (pull_request_raw )
814
814
815
815
# Check if it's a valid pull request
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def __init__(
129
129
if data_file_path .lower ().startswith ("http" ):
130
130
# Reference is to a URL.
131
131
try :
132
- response = requests .get (url = data_file_path )
132
+ response = requests .get (url = data_file_path , timeout = 30 )
133
133
except Exception as error :
134
134
raise FileNotFoundError (
135
135
f"Problem while attempting to access data file URL '{ data_file_path } ': { error } "
@@ -166,7 +166,7 @@ def __init__(
166
166
167
167
if honor_exclusions :
168
168
try :
169
- response = requests .get (url = EXCLUSIONS_URL )
169
+ response = requests .get (url = EXCLUSIONS_URL , timeout = 10 )
170
170
if response .status_code == 200 :
171
171
exclusions = response .text .splitlines ()
172
172
exclusions = [exclusion .strip () for exclusion in exclusions ]
You can’t perform that action at this time.
0 commit comments