summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-10-31 13:19:02 (GMT)
committerSteven Knight <knight@baldmt.com>2008-10-31 13:19:02 (GMT)
commit10c7fca471fccbb2178cba2b17dd2e0a39911d42 (patch)
treeefbeadd00313a1338429c5354d7703642dc35252
parent7af32467718be561f1ccfc4ba643625cdf87d54f (diff)
downloadSCons-10c7fca471fccbb2178cba2b17dd2e0a39911d42.zip
SCons-10c7fca471fccbb2178cba2b17dd2e0a39911d42.tar.gz
SCons-10c7fca471fccbb2178cba2b17dd2e0a39911d42.tar.bz2
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.
-rw-r--r--src/engine/SCons/Action.py2
1 files changed, 2 insertions, 0 deletions
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()