diff options
| author | Steven Knight <knight@baldmt.com> | 2003-01-27 03:55:51 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2003-01-27 03:55:51 (GMT) |
| commit | 078be7b37ba947064d07ac85969f1bd5f3c8ae27 (patch) | |
| tree | bb2dcbd756279f2004eeb24e3ba47bd32511e3c2 /src/engine/SCons/Script | |
| parent | fb4152bf88a71d44c6ec7627d63dae6b93ee348a (diff) | |
| download | SCons-078be7b37ba947064d07ac85969f1bd5f3c8ae27.zip SCons-078be7b37ba947064d07ac85969f1bd5f3c8ae27.tar.gz SCons-078be7b37ba947064d07ac85969f1bd5f3c8ae27.tar.bz2 | |
Provide a better error message when a BuildDir() is read-only.
Diffstat (limited to 'src/engine/SCons/Script')
| -rw-r--r-- | src/engine/SCons/Script/__init__.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 9257266..a14c7ae 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -65,7 +65,6 @@ import SCons.Taskmaster from SCons.Util import display import SCons.Warnings - # # Task control. # @@ -642,8 +641,6 @@ class OptParser(OptionParser): def _main(): - import SCons.Node - targets = [] # Enable deprecated warnings by default. @@ -753,8 +750,19 @@ def _main(): display("scons: Reading SConscript files ...") try: start_time = time.time() - for script in scripts: - SCons.Script.SConscript.SConscript(script) + try: + for script in scripts: + SCons.Script.SConscript.SConscript(script) + except SCons.Errors.StopError, e: + # We had problems reading an SConscript file, such as it + # couldn't be copied in to the BuildDir. Since we're just + # reading SConscript files and haven't started building + # things yet, stop regardless of whether they used -i or -k + # or anything else, but don't say "Stop." on the message. + global exit_status + sys.stderr.write("scons: *** %s\n" % e) + exit_status = 2 + sys.exit(exit_status) global sconscript_time sconscript_time = time.time() - start_time except PrintHelp, text: |
