diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-02 10:24:17 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-02 10:24:17 -0800 |
commit | 9f6ebd7c6ee37e151f78cf30b64ee35dd43847c0 (patch) | |
tree | 9e9547449858e846bf9c78e4c9407aa29548a992 /lib | |
parent | a0c6519de9d03744e33b5187d42ec0d966dbd3e0 (diff) | |
parent | a339ac0a727458ab55b2e0d27ff17dcc139c0a32 (diff) | |
download | spack-9f6ebd7c6ee37e151f78cf30b64ee35dd43847c0.tar.gz spack-9f6ebd7c6ee37e151f78cf30b64ee35dd43847c0.tar.bz2 spack-9f6ebd7c6ee37e151f78cf30b64ee35dd43847c0.tar.xz spack-9f6ebd7c6ee37e151f78cf30b64ee35dd43847c0.zip |
Merge pull request #465 from citibeth/efischer/160229-RemoteRootBugfix
Bug Fix: When Spack create roots around for other versions, it sometiā¦
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/checksum.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index b1ad89dbb8..c451993233 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -58,24 +58,29 @@ def get_checksums(versions, urls, **kwargs): tty.msg("Downloading...") hashes = [] - for i, (url, version) in enumerate(zip(urls, versions)): + i = 0 + for url, version in zip(urls, versions): stage = Stage(url) try: stage.fetch() if i == 0 and first_stage_function: first_stage_function(stage) - hashes.append( - spack.util.crypto.checksum(hashlib.md5, stage.archive_file)) + hashes.append((version, + spack.util.crypto.checksum(hashlib.md5, stage.archive_file))) except FailedDownloadError, e: tty.msg("Failed to fetch %s" % url) continue + except Exception, e: + tty.msg('Something failed on %s, skipping.\n (%s)' % (url, e)) + continue finally: if not keep_stage: stage.destroy() + i += 1 - return zip(versions, hashes) + return hashes |