Skip to content

Commit 99d335b

Browse files
committed
result_summary/utils: ignore failures on log retrieval
Make the script continue running if there was an error fetching a test log. Signed-off-by: Ricardo Cañuelo <[email protected]>
1 parent e63fdc9 commit 99d335b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/result_summary/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ def get_log(url, snippet_lines=0):
126126
If snippet_lines > 0: the first snippet_lines log lines
127127
If snippet_lines < 0: the last snippet_lines log lines
128128
"""
129-
response = requests.get(url)
129+
try:
130+
response = requests.get(url)
131+
except:
132+
# Bail out if there was any error fetching the log
133+
return None
130134
if not len(response.content):
131135
return None
132136
try:

0 commit comments

Comments
 (0)