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`.
This commit is contained in:
parent
4f09e8c975
commit
b1e5ec0573
@ -308,7 +308,7 @@ def fetch(self, mirror_only=False):
|
||||
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)]
|
||||
|
Loading…
Reference in New Issue
Block a user