diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2018-03-22 19:37:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 19:37:49 -0500 |
commit | f721fb3e4c9dc6354e6db25a544e02e726107b5e (patch) | |
tree | d32b536bde8daeae9b76329d90293102d5308ede /lib | |
parent | 32a78eae73f6aa676318dc98e516b52c1fcbe231 (diff) | |
download | spack-f721fb3e4c9dc6354e6db25a544e02e726107b5e.tar.gz spack-f721fb3e4c9dc6354e6db25a544e02e726107b5e.tar.bz2 spack-f721fb3e4c9dc6354e6db25a544e02e726107b5e.tar.xz spack-f721fb3e4c9dc6354e6db25a544e02e726107b5e.zip |
Fix error raising during install with Python 3 (#6894)
* Fix error raising during install with Python 3
* Fix env_path too
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/package.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index de2c231e90..4a1f24b234 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -820,11 +820,17 @@ class PackageBase(with_metaclass(PackageMeta, object)): @property def env_path(self): - return os.path.join(self.stage.source_path, 'spack-build.env') + if self.stage.source_path is None: + return None + else: + return os.path.join(self.stage.source_path, 'spack-build.env') @property def log_path(self): - return os.path.join(self.stage.source_path, 'spack-build.out') + if self.stage.source_path is None: + return None + else: + return os.path.join(self.stage.source_path, 'spack-build.out') def _make_fetcher(self): # Construct a composite fetcher that always contains at least |