From 13464ddb32955a15cac1b25d5dee2be1e3677dd3 Mon Sep 17 00:00:00 2001 From: Mikhail Gordeev Date: Sat, 18 Apr 2020 03:06:44 +0300 Subject: [PATCH] Close Popen stdout --- cloud_build/cloud_build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud_build/cloud_build.py b/cloud_build/cloud_build.py index 9f17409..1931093 100755 --- a/cloud_build/cloud_build.py +++ b/cloud_build/cloud_build.py @@ -196,6 +196,8 @@ class CB: with open(stdout_to_file, 'w') as f: if p.stdout: f.write(p.stdout.read().decode()) + if p.stdout is not None: + p.stdout.close() else: rc = subprocess.call(cmd) maybe_fail(string, rc)