From a4dec76f4752c29b43ba40e0eb120e529c29248a Mon Sep 17 00:00:00 2001 From: nghazalibeiklar Date: Mon, 27 Jun 2022 11:48:53 +1000 Subject: [PATCH] added try-exception for crowd_latest --- .../molecule/crowd_latest/tests/test_default.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/product_install/molecule/crowd_latest/tests/test_default.py b/roles/product_install/molecule/crowd_latest/tests/test_default.py index 31e4c3c..ee51787 100644 --- a/roles/product_install/molecule/crowd_latest/tests/test_default.py +++ b/roles/product_install/molecule/crowd_latest/tests/test_default.py @@ -44,7 +44,10 @@ def test_completed_lockfile(host): def get_version(url): if url.lower().startswith('http'): - upstream_req = urllib.request.Request(url) + try: + upstream_req = urllib.request.Request(url) + except: + return None else: raise ValueError from None with urllib.request.urlopen(upstream_req) as upstream_response: