Fix bugs in DIYStage: fetch & context handling.

- DIYStage needs to be a context handler
- DIYStage.fetch needs to take 2 args.
This commit is contained in:
Todd Gamblin 2016-03-08 13:58:41 -08:00
parent df84677d16
commit 9c61843737

View file

@ -477,10 +477,14 @@ def chdir(self):
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):