You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/02/23 19:18:37 UTC

mesos git commit: Fixed minor bug in generate-endpoint-help.py.

Repository: mesos
Updated Branches:
  refs/heads/master b1092b005 -> 9fc203332


Fixed minor bug in generate-endpoint-help.py.

If the script exited when `current_subprocess` was None, it would
print an ugly exception stack trace.

Review: https://reviews.apache.org/r/43384/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9fc20333
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9fc20333
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9fc20333

Branch: refs/heads/master
Commit: 9fc203332c49e61d537fa0e6b7baa0c7ebc254cd
Parents: b1092b0
Author: Neil Conway <ne...@gmail.com>
Authored: Tue Feb 23 10:18:01 2016 -0800
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Feb 23 10:18:26 2016 -0800

----------------------------------------------------------------------
 support/generate-endpoint-help.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9fc20333/support/generate-endpoint-help.py
----------------------------------------------------------------------
diff --git a/support/generate-endpoint-help.py b/support/generate-endpoint-help.py
index 2833384..b32f746 100755
--- a/support/generate-endpoint-help.py
+++ b/support/generate-endpoint-help.py
@@ -313,10 +313,15 @@ def start_agent():
   return agent
 
 
+def cleanup_on_exit():
+  if current_subprocess:
+    current_subprocess.kill()
+
+
 if __name__ == '__main__':
   parse_options()
 
-  atexit.register(lambda: current_subprocess.kill())
+  atexit.register(cleanup_on_exit)
 
   current_subprocess = start_master()
   master_help = get_help(HOST_IP, MASTER_PORT)