Close popen stdout and stderr

They should get cleaned up anyway, but Python 3 gives
us an error message. This silences it.
This commit is contained in:
Bob Lantz
2018-07-25 19:44:44 -07:00
parent 88cbf4ec42
commit 56fc6c3955
+4
View File
@@ -130,6 +130,10 @@ def errRun( *cmd, **kwargs ):
poller.unregister( fd )
returncode = popen.wait()
# Python 3 complains if we don't explicitly close these
popen.stdout.close()
if stderr == PIPE:
popen.stderr.close()
debug( out, err, returncode )
return out, err, returncode
# pylint: enable=too-many-branches