From d0b01a2b760d37eceaf5ed28d741ae2776132c2a Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Sun, 9 Jun 2013 06:27:46 +0000 Subject: [PATCH] Flush subprocess stdout before trying to read from it git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1491146 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/buildAndPushRelease.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py index 4820899b2d3..af4d7b98b7d 100644 --- a/dev-tools/scripts/buildAndPushRelease.py +++ b/dev-tools/scripts/buildAndPushRelease.py @@ -49,6 +49,7 @@ def runAndSendGPGPassword(command, password): p = subprocess.Popen(command, shell=True, bufsize=0, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE) f = open(LOG, 'ab') while True: + p.stdout.flush() line = p.stdout.readline() if len(line) == 0: break