mirror of
https://github.com/apache/lucene.git
synced 2025-02-07 02:28:49 +00:00
buildAndPushRelease.py: use wait() instead of poll() to check for process completion
This commit is contained in:
parent
74050a3f15
commit
2a13e783f9
@ -53,9 +53,14 @@ def runAndSendGPGPassword(command, password):
|
||||
p.stdin.write((password + '\n').encode('UTF-8'))
|
||||
p.stdin.write('\n'.encode('UTF-8'))
|
||||
|
||||
result = p.poll()
|
||||
if result is not None:
|
||||
msg = ' FAILED: %s [see log %s]' % (command, LOG)
|
||||
try:
|
||||
result = p.wait(timeout=120)
|
||||
if result != 0:
|
||||
msg = ' FAILED: %s [see log %s]' % (command, LOG)
|
||||
print(msg)
|
||||
raise RuntimeError(msg)
|
||||
except TimeoutExpired:
|
||||
msg = ' FAILED: %s [timed out after 2 minutes; see log %s]' % (command, LOG)
|
||||
print(msg)
|
||||
raise RuntimeError(msg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user