summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-08 13:58:41 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-08 13:58:41 -0800
commit9c6184373752746e1219263c1afd9d1955911891 (patch)
tree24deabb877b3f4959916c2b19b9691b98d88c0f7
parentdf84677d1640139673c26a4c407698486905fbb3 (diff)
downloadspack-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.py6
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):