Skip to content

Commit 6ba1af1

Browse files
committed
use proc.communicate() instead of wait() to prevent deadlock
1 parent 6c55535 commit 6ba1af1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build_platform.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,8 @@ def test_examples_in_folder(folderpath):
336336
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
337337
stderr=subprocess.PIPE)
338338
try:
339-
r = proc.wait(timeout=60)
340-
out = proc.stdout.read()
341-
err = proc.stderr.read()
339+
out, err = proc.communicate(timeout=60)
340+
r = 0
342341
except:
343342
proc.kill()
344343
out, err = proc.communicate()

0 commit comments

Comments
 (0)