Merge pull request #1460 from glennpj/fix_list_vcs
Catch error for version in VCS
This commit is contained in:
commit
90f68d2c66
1 changed files with 12 additions and 8 deletions
|
@ -321,15 +321,19 @@ def fetch(self, mirror_only=False):
|
||||||
package_name = os.path.dirname(self.mirror_path)
|
package_name = os.path.dirname(self.mirror_path)
|
||||||
pkg = spack.repo.get(package_name)
|
pkg = spack.repo.get(package_name)
|
||||||
if pkg.list_url is not None and pkg.url is not None:
|
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:
|
try:
|
||||||
url_from_list = versions[Version(archive_version)]
|
archive_version = spack.url.parse_version(
|
||||||
fetchers.append(fs.URLFetchStrategy(url_from_list, digest))
|
self.default_fetcher.url)
|
||||||
except KeyError:
|
versions = pkg.fetch_remote_versions()
|
||||||
tty.msg("Can not find version %s in url_list" %
|
try:
|
||||||
archive_version)
|
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:
|
for fetcher in fetchers:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue