diff options
Diffstat (limited to 'third_party/scons/scons-local/SCons/Script/SConscript.py')
-rw-r--r-- | third_party/scons/scons-local/SCons/Script/SConscript.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/third_party/scons/scons-local/SCons/Script/SConscript.py b/third_party/scons/scons-local/SCons/Script/SConscript.py index 87cc8cf..c52c979 100644 --- a/third_party/scons/scons-local/SCons/Script/SConscript.py +++ b/third_party/scons/scons-local/SCons/Script/SConscript.py @@ -28,7 +28,7 @@ files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/SConscript.py 3603 2008/10/10 05:46:45 scons" +__revision__ = "src/engine/SCons/Script/SConscript.py 3842 2008/12/20 22:59:52 scons" import SCons import SCons.Action @@ -279,7 +279,20 @@ def _SConscript(fs, *files, **kw): fs.chdir(frame.prev_dir, change_os_dir=0) rdir = frame.prev_dir.rdir() rdir._create() # Make sure there's a directory there. - os.chdir(rdir.get_abspath()) + try: + os.chdir(rdir.get_abspath()) + except OSError, e: + # We still couldn't chdir there, so raise the error, + # but only if actions are being executed. + # + # If the -n option was used, the directory would *not* + # have been created and we should just carry on and + # let things muddle through. This isn't guaranteed + # to work if the SConscript files are reading things + # from disk (for example), but it should work well + # enough for most configurations. + if SCons.Action.execute_actions: + raise e results.append(frame.retval) |