Commit 0fe309cd authored by Xavier Thompson's avatar Xavier Thompson

SlapPopen: Close stdout and stderr

parent 6393f62f
......@@ -199,6 +199,13 @@ class SlapPopen(subprocess.Popen):
e.output = e.stdout = ''.join(buffers.get(stdout_fileno, ()))
e.stderr = ''.join(buffers.get(stderr_fileno, ()))
raise
finally:
for s in (self.stdout, self.stderr):
if s:
try:
s.close()
except OSError:
pass
self.output = ''.join(buffers.get(stdout_fileno, ()))
self.error = ''.join(buffers.get(stderr_fileno, ()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment