Fix calling Exit() from within a Python function action, so that it gets
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 31 Oct 2008 13:19:02 +0000 (13:19 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 31 Oct 2008 13:19:02 +0000 (13:19 +0000)
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

index cfd4a50c57cac72804478aef1aab705a5f27a0ac..64bbfe2db160ea9ca601bf4db6163d002da9f4d1 100644 (file)
@@ -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()