package.py : updated logic to log.py rework
Conflicts: lib/spack/spack/package.py
This commit is contained in:
parent
513cdd580e
commit
813cb032c4
1 changed files with 7 additions and 2 deletions
|
@ -203,6 +203,11 @@ def __exit__(self, exc_type, exception, traceback):
|
||||||
# Flush the log to disk.
|
# Flush the log to disk.
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
if self.directAssignment:
|
||||||
|
# We seem to need this only to pass test/install.py
|
||||||
|
sys.stdout = self._stdout
|
||||||
|
sys.stderr = self._stderr
|
||||||
|
else:
|
||||||
os.dup2(self._stdout, sys.stdout.fileno())
|
os.dup2(self._stdout, sys.stdout.fileno())
|
||||||
os.dup2(self._stderr, sys.stderr.fileno())
|
os.dup2(self._stderr, sys.stderr.fileno())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue