Fetching: log more exceptions (#32736)

Include exception info related to url retrieval in debug messages
which otherwise would be swallowed. This is intended to be useful
for detecting if CA configuration interferes with downloads from
HTTPS links.
This commit is contained in:
Peter Scheibel
2022-09-22 10:54:52 -07:00
committed by GitHub
parent 0869d22fcb
commit 4094e59ab8
2 changed files with 3 additions and 1 deletions

View File

@@ -338,6 +338,7 @@ def fetch(self):
errors = []
for url in self.candidate_urls:
if not web_util.url_exists(url, self.curl):
tty.debug("URL does not exist: " + url)
continue
try:

View File

@@ -444,7 +444,8 @@ def url_exists(url, curl=None):
try:
read_from_url(url)
return True
except (SpackWebError, URLError):
except (SpackWebError, URLError) as e:
tty.debug("Failure reading URL: " + str(e))
return False