diff options
author | Steven Knight <knight@baldmt.com> | 2008-10-31 13:19:02 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-10-31 13:19:02 +0000 |
commit | 525f8fb3acb5acd12be90148edb4cf43db680ff4 (patch) | |
tree | efbeadd00313a1338429c5354d7703642dc35252 /src/engine/SCons/Action.py | |
parent | 17ab99706cc92546bc661baa03e0a33c1170d33d (diff) | |
download | scons-525f8fb3acb5acd12be90148edb4cf43db680ff4.tar.gz |
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.
Diffstat (limited to 'src/engine/SCons/Action.py')
-rw-r--r-- | src/engine/SCons/Action.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |