@@ -73,15 +73,15 @@ def read_payload_list(filename="payload_id_list.txt"):
73
73
return payload_list
74
74
75
75
76
- def download_latest_payload_id_list (url = PAYLOAD_ID_LIST_URL , filename = None ):
76
+ def download_latest_payload_id_list (url = PAYLOAD_ID_LIST_URL , filename = None , timeout = 5 ):
77
77
"""
78
78
Attempt to download the latest payload ID list from Github, and parse into a dictionary.
79
79
Optionally, save it to a file.
80
80
"""
81
81
# Download the list.
82
82
try :
83
83
logging .info ("Attempting to download latest payload ID list from GitHub..." )
84
- _r = requests .get (url , timeout = 10 )
84
+ _r = requests .get (url , timeout = timeout )
85
85
except Exception as e :
86
86
logging .error ("Unable to get latest payload ID list: %s" % str (e ))
87
87
return None
@@ -212,13 +212,13 @@ def grab_latest_custom_field_list(url=HORUS_CUSTOM_FIELD_URL, local_file="custom
212
212
return True
213
213
214
214
215
- def download_latest_custom_field_list (url = HORUS_CUSTOM_FIELD_URL , filename = None ):
215
+ def download_latest_custom_field_list (url = HORUS_CUSTOM_FIELD_URL , filename = None , timeout = 5 ):
216
216
""" Attempt to download the latest custom field list from Github """
217
217
218
218
# Download the list.
219
219
try :
220
220
logging .info ("Attempting to download latest custom field list from GitHub..." )
221
- _r = requests .get (url , timeout = 10 )
221
+ _r = requests .get (url , timeout = timeout )
222
222
except Exception as e :
223
223
logging .error ("Unable to get latest custom field list: %s" % str (e ))
224
224
return None
0 commit comments