Fix resource leak

This commit is contained in:
Richard Berger
2016-08-09 04:08:01 -04:00
parent 62b7b69a87
commit 59dc83eadb

View File

@ -304,6 +304,9 @@ class OutputCapture(object):
def __exit__(self, type, value, tracebac):
os.dup2(self.stdout, self.stdout_fd)
os.close(self.stdout)
os.close(self.stdout_pipe_read)
os.close(self.stdout_pipe_write)
# check if we have more to read from the pipe
def more_data(self, pipe):