summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2016-08-02 11:50:12 -0500
committerGlenn Johnson <glenn-johnson@uiowa.edu>2016-08-02 11:54:09 -0500
commit2929fb0a4d25e17ff84590c65275793682f63d24 (patch)
treedefcb9f32f96494e90b60d5ec78f6810b04fa819 /lib
parent9490bd2154dfbee2cf96aca8ba62e2ec723fa2b3 (diff)
downloadspack-2929fb0a4d25e17ff84590c65275793682f63d24.tar.gz
spack-2929fb0a4d25e17ff84590c65275793682f63d24.tar.bz2
spack-2929fb0a4d25e17ff84590c65275793682f63d24.tar.xz
spack-2929fb0a4d25e17ff84590c65275793682f63d24.zip
Move archive_version setting to if block
The archive_version variable should only get set if versions will be checked and that is only if there is a list_url in the package file. For VCS repos setting the variable triggers an error from web.py as it parses the default_fetcher object. This should fix #1422.
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)]