summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2016-08-02 10:05:25 -0700
committerGitHub <noreply@github.com>2016-08-02 10:05:25 -0700
commit326b9838ed0d59f8a91dba72785ad9eb6fe4f054 (patch)
tree22a11bd1d4d47730b11aa4b5739d0d7557fccfb0 /lib
parent91004158c662253e7188a79ade2f4b19aa7ee98a (diff)
parent2929fb0a4d25e17ff84590c65275793682f63d24 (diff)
downloadspack-326b9838ed0d59f8a91dba72785ad9eb6fe4f054.tar.gz
spack-326b9838ed0d59f8a91dba72785ad9eb6fe4f054.tar.bz2
spack-326b9838ed0d59f8a91dba72785ad9eb6fe4f054.tar.xz
spack-326b9838ed0d59f8a91dba72785ad9eb6fe4f054.zip
Merge pull request #1423 from glennpj/fix_url
Move archive_version setting to if block
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/stage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 1a8b1a169a..553c4ad05f 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -318,10 +318,11 @@ class Stage(object):
fetchers.insert(0, spack.cache.fetcher(self.mirror_path, digest))
# Look for the archive in list_url
- 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 and pkg.url is not None:
+ archive_version = spack.url.parse_version(
+ self.default_fetcher.url)
versions = pkg.fetch_remote_versions()
try:
url_from_list = versions[Version(archive_version)]