Close Popen stdout
This commit is contained in:
parent
2ddc5c5249
commit
13464ddb32
@ -196,6 +196,8 @@ class CB:
|
|||||||
with open(stdout_to_file, 'w') as f:
|
with open(stdout_to_file, 'w') as f:
|
||||||
if p.stdout:
|
if p.stdout:
|
||||||
f.write(p.stdout.read().decode())
|
f.write(p.stdout.read().decode())
|
||||||
|
if p.stdout is not None:
|
||||||
|
p.stdout.close()
|
||||||
else:
|
else:
|
||||||
rc = subprocess.call(cmd)
|
rc = subprocess.call(cmd)
|
||||||
maybe_fail(string, rc)
|
maybe_fail(string, rc)
|
||||||
|
Loading…
Reference in New Issue
Block a user