diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-08 13:58:41 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-08 13:58:41 -0800 |
commit | 9c6184373752746e1219263c1afd9d1955911891 (patch) | |
tree | 24deabb877b3f4959916c2b19b9691b98d88c0f7 | |
parent | df84677d1640139673c26a4c407698486905fbb3 (diff) | |
download | spack-9c6184373752746e1219263c1afd9d1955911891.tar.gz spack-9c6184373752746e1219263c1afd9d1955911891.tar.bz2 spack-9c6184373752746e1219263c1afd9d1955911891.tar.xz spack-9c6184373752746e1219263c1afd9d1955911891.zip |
Fix bugs in DIYStage: fetch & context handling.
- DIYStage needs to be a context handler
- DIYStage.fetch needs to take 2 args.
-rw-r--r-- | lib/spack/spack/stage.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index d2ed03c271..5354135e6a 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -477,10 +477,14 @@ class DIYStage(object): else: raise ChdirError("Setup failed: no such directory: " + self.path) + # DIY stages do nothing as context managers. + def __enter__(self): pass + def __exit__(self, exc_type, exc_val, exc_tb): pass + def chdir_to_source(self): self.chdir() - def fetch(self): + def fetch(self, mirror_only): tty.msg("No need to fetch for DIY.") def check(self): |