summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py12
-rw-r--r--lib/spack/spack/stage.py2
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index d48b999ddc..0e848652ae 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -156,9 +156,10 @@ class URLFetchStrategy(FetchStrategy):
if spack.curl.returncode == 22:
# This is a 404. Curl will print the error.
- raise FailedDownloadError(self.url)
+ raise FailedDownloadError(
+ self.url, "URL %s was not found!" % self.url)
- if spack.curl.returncode == 60:
+ elif spack.curl.returncode == 60:
# This is a certificate error. Suggest spack -k
raise FailedDownloadError(
self.url,
@@ -168,6 +169,13 @@ class URLFetchStrategy(FetchStrategy):
"can try running spack -k, which will not check SSL certificates."
"Use this at your own risk.")
+ else:
+ # This is some other curl error. Curl will print the
+ # error, but print a spack message too
+ raise FailedDownloadError(
+ self.url, "Curl failed with error %d", spack.curl.returncode)
+
+
# Check if we somehow got an HTML file rather than the archive we
# asked for. We only look at the last content type, to handle
# redirects properly.
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index f09346ab9b..84454c9d2c 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -260,6 +260,8 @@ class Stage(object):
tty.msg("Fetching from %s failed." % fetcher)
tty.debug(e)
continue
+ else:
+ tty.die("All fetchers failed for %s" % self.name)
def check(self):