From 4d48f5e395bb3b4b4cd625609bf63e87ff87c363 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Fri, 31 Oct 2008 13:19:02 +0000 Subject: [PATCH] Fix calling Exit() from within a Python function action, so that it gets detected and exits with the specified value under Python versions before 2.5, by explicitly catching and re-raising the SystemExit exception. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3752 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Action.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index cfd4a50c..64bbfe2d 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -951,6 +951,8 @@ class FunctionAction(_ActionAction): rsources = map(rfile, source) try: result = self.execfunction(target=target, source=rsources, env=env) + except SystemExit, e: + raise except Exception, e: result = e exc_info = sys.exc_info() -- 2.26.2