summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2016-08-05 13:34:37 -0700
committerGitHub <noreply@github.com>2016-08-05 13:34:37 -0700
commit90f68d2c666b2d9408f66df6f7e42b2d60b38fd6 (patch)
treedaedbb05ff0cba80ba0e6c091013d85ba173f729
parent8e20a14945ef7197286f61799902dd1d9589fb2e (diff)
parent20221ee3aa3003d4180c86bf43bb7156a04d08e7 (diff)
downloadspack-90f68d2c666b2d9408f66df6f7e42b2d60b38fd6.tar.gz
spack-90f68d2c666b2d9408f66df6f7e42b2d60b38fd6.tar.bz2
spack-90f68d2c666b2d9408f66df6f7e42b2d60b38fd6.tar.xz
spack-90f68d2c666b2d9408f66df6f7e42b2d60b38fd6.zip
Merge pull request #1460 from glennpj/fix_list_vcs
Catch error for version in VCS
-rw-r--r--lib/spack/spack/stage.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 553c4ad05f..8fcc331482 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -321,15 +321,19 @@ class Stage(object):
package_name = os.path.dirname(self.mirror_path)
pkg = spack.repo.get(package_name)
if pkg.list_url is not None and pkg.url is not None:
- archive_version = spack.url.parse_version(
- self.default_fetcher.url)
- versions = pkg.fetch_remote_versions()
try:
- url_from_list = versions[Version(archive_version)]
- fetchers.append(fs.URLFetchStrategy(url_from_list, digest))
- except KeyError:
- tty.msg("Can not find version %s in url_list" %
- archive_version)
+ archive_version = spack.url.parse_version(
+ self.default_fetcher.url)
+ versions = pkg.fetch_remote_versions()
+ try:
+ url_from_list = versions[Version(archive_version)]
+ fetchers.append(fs.URLFetchStrategy(
+ url_from_list, digest))
+ except KeyError:
+ tty.msg("Can not find version %s in url_list" %
+ archive_version)
+ except:
+ tty.msg("Could not determine url from list_url.")
for fetcher in fetchers:
try: