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:
@@ -130,6 +130,10 @@ def errRun( *cmd, **kwargs ):
|
|||||||
poller.unregister( fd )
|
poller.unregister( fd )
|
||||||
|
|
||||||
returncode = popen.wait()
|
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 )
|
debug( out, err, returncode )
|
||||||
return out, err, returncode
|
return out, err, returncode
|
||||||
# pylint: enable=too-many-branches
|
# pylint: enable=too-many-branches
|
||||||
|
|||||||
Reference in New Issue
Block a user