aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-06 14:51:04 +0300
committerBonfaceKilz2023-11-06 14:52:44 +0300
commitb6354e7b892c4fc9f9f940856fa4d19fa192533a (patch)
tree868c27d04d863b43ebce4a7090040f1dfb94d95f
parent9233c4477f69819df59cb1ca639aef47ad36ef20 (diff)
downloadgenenetwork2-b6354e7b892c4fc9f9f940856fa4d19fa192533a.tar.gz
Get full trace of SSL error and reduce number of retries in MR.
* test/requests/test-website.py (host_is_online): Reduce tries from 10 to 5. Also, print out the full error---useful for CD debugging. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xtest/requests/test-website.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/requests/test-website.py b/test/requests/test-website.py
index fe197018..91bcb12d 100755
--- a/test/requests/test-website.py
+++ b/test/requests/test-website.py
@@ -22,13 +22,14 @@ print("Mechanical Rob firing up...")
def host_is_online(host):
import time
import requests
- for count in range(1, 10):
+ for count in range(1, 5):
try:
time.sleep(count)
requests.get(host, verify=False)
return True
except Exception as cre:
print(f"Retrying in {count + 1} seconds ...")
+ print(f"Error: {cre}")
return False