lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [3/3] lucene-solr:master: buildAndPushRelease.py: use wait() instead of poll() to check for process completion
Date Mon, 02 Oct 2017 17:39:01 GMT
buildAndPushRelease.py: use wait() instead of poll() to check for process completion


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2a13e783
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2a13e783
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2a13e783

Branch: refs/heads/master
Commit: 2a13e783f94be23c3fa2d795e36dd903a7d24585
Parents: 74050a3
Author: Steve Rowe <sarowe@gmail.com>
Authored: Mon Oct 2 13:34:30 2017 -0400
Committer: Steve Rowe <sarowe@gmail.com>
Committed: Mon Oct 2 13:34:56 2017 -0400

----------------------------------------------------------------------
 dev-tools/scripts/buildAndPushRelease.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2a13e783/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 1143ebf..cd2fdd1 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -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)
 


Mime
View raw message