summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2022-09-22 10:54:52 -0700
committerGitHub <noreply@github.com>2022-09-22 10:54:52 -0700
commit4094e59ab86284ee955bb91bfc4f59cb4ebd3e8b (patch)
tree759199c6e6759a171402eea1f0b9950f60328325 /lib
parent0869d22fcb4f29ff2ca00977e5ef7f03ad5dede4 (diff)
downloadspack-4094e59ab86284ee955bb91bfc4f59cb4ebd3e8b.tar.gz
spack-4094e59ab86284ee955bb91bfc4f59cb4ebd3e8b.tar.bz2
spack-4094e59ab86284ee955bb91bfc4f59cb4ebd3e8b.tar.xz
spack-4094e59ab86284ee955bb91bfc4f59cb4ebd3e8b.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py1
-rw-r--r--lib/spack/spack/util/web.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index ae23bacf14..5ed46c3278 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -338,6 +338,7 @@ class URLFetchStrategy(FetchStrategy):
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:
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 202cb8a504..fa4119f917 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -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