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:
parent
0869d22fcb
commit
4094e59ab8
@ -338,6 +338,7 @@ def fetch(self):
|
|||||||
errors = []
|
errors = []
|
||||||
for url in self.candidate_urls:
|
for url in self.candidate_urls:
|
||||||
if not web_util.url_exists(url, self.curl):
|
if not web_util.url_exists(url, self.curl):
|
||||||
|
tty.debug("URL does not exist: " + url)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -444,7 +444,8 @@ def url_exists(url, curl=None):
|
|||||||
try:
|
try:
|
||||||
read_from_url(url)
|
read_from_url(url)
|
||||||
return True
|
return True
|
||||||
except (SpackWebError, URLError):
|
except (SpackWebError, URLError) as e:
|
||||||
|
tty.debug("Failure reading URL: " + str(e))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user