From b1e5ec05739b05ed3781473b0a27b04f7b053ce6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Jul 2016 09:21:11 -0500 Subject: Make sure package has the `url` attribute. In addition to `list_url` make sure the package has the `url` attribute set before attempting to add urls from a list. This is to cover the case where there may be a `list_url` specified in tandem with a `url_for_version`. --- lib/spack/spack/stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 6cf736b3f0..8f3f0e163a 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -308,7 +308,7 @@ class Stage(object): archive_version = spack.url.parse_version(self.default_fetcher.url) package_name = os.path.dirname(self.mirror_path) pkg = spack.repo.get(package_name) - if pkg.list_url is not None: + if pkg.list_url is not None and pkg.url is not None: versions = pkg.fetch_remote_versions() try: url_from_list = versions[Version(archive_version)] -- cgit v1.2.3-60-g2f50