diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2016-07-24 09:21:11 -0500 |
---|---|---|
committer | Glenn Johnson <glenn-johnson@uiowa.edu> | 2016-07-24 09:21:11 -0500 |
commit | b1e5ec05739b05ed3781473b0a27b04f7b053ce6 (patch) | |
tree | 26907cbc07d2ad16e20d372d188f88aa82bd8c68 /lib | |
parent | 4f09e8c9759473257ca8857bfa09eeeeca08cafd (diff) | |
download | spack-b1e5ec05739b05ed3781473b0a27b04f7b053ce6.tar.gz spack-b1e5ec05739b05ed3781473b0a27b04f7b053ce6.tar.bz2 spack-b1e5ec05739b05ed3781473b0a27b04f7b053ce6.tar.xz spack-b1e5ec05739b05ed3781473b0a27b04f7b053ce6.zip |
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`.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/stage.py | 2 |
1 files changed, 1 insertions, 1 deletions
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)] |