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:
1 parent
88cbf4ec42
commit
56fc6c3955
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user