Skip to content

Commit c09dd9b

Browse files
committed
Shorten timeout on payload ID list download.
1 parent 99a5dca commit c09dd9b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

horusdemodlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.19"
1+
__version__ = "0.1.20"

horusdemodlib/payloads.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ def read_payload_list(filename="payload_id_list.txt"):
7373
return payload_list
7474

7575

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):
7777
"""
7878
Attempt to download the latest payload ID list from Github, and parse into a dictionary.
7979
Optionally, save it to a file.
8080
"""
8181
# Download the list.
8282
try:
8383
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)
8585
except Exception as e:
8686
logging.error("Unable to get latest payload ID list: %s" % str(e))
8787
return None
@@ -212,13 +212,13 @@ def grab_latest_custom_field_list(url=HORUS_CUSTOM_FIELD_URL, local_file="custom
212212
return True
213213

214214

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):
216216
""" Attempt to download the latest custom field list from Github """
217217

218218
# Download the list.
219219
try:
220220
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)
222222
except Exception as e:
223223
logging.error("Unable to get latest custom field list: %s" % str(e))
224224
return None

0 commit comments

Comments
 (0)