From 10c7fca471fccbb2178cba2b17dd2e0a39911d42 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Fri, 31 Oct 2008 13:19:02 +0000 Subject: 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. --- 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 cfd4a50..64bbfe2 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() -- cgit v0.12