From: stevenknight Date: Fri, 31 Oct 2008 13:19:02 +0000 (+0000) Subject: Fix calling Exit() from within a Python function action, so that it gets X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d48f5e395bb3b4b4cd625609bf63e87ff87c363;p=scons.git 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 --- 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()