From 6b98e8605654ea4cea064ae7f8c330d99e2c4d3e Mon Sep 17 00:00:00 2001 From: Matt Belhorn Date: Thu, 6 Oct 2016 05:41:28 -0400 Subject: Fixes bug closing Executable file io-streams (#1890) Input/output/error streams not directed to None or 'str' were not being closed because `close()` method was being called on the argument value (a string type) instead of the open file descriptor object. --- lib/spack/spack/util/executable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 5c27b92df5..4fe4bd26ba 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -185,11 +185,11 @@ class Executable(object): finally: if close_ostream: - output.close() + ostream.close() if close_estream: - error.close() + estream.close() if close_istream: - input.close() + istream.close() def __eq__(self, other): return self.exe == other.exe -- cgit v1.2.3-70-g09d2