summaryrefslogtreecommitdiffstats
path: root/src/script/scons.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-21 02:20:19 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-21 02:20:19 (GMT)
commit635256859678b6b862b89d4c5ce890b4923e8394 (patch)
tree401e130d6aefcd0ec0390497fe1bc8d58dd02b37 /src/script/scons.py
parentc8bbea81460524f6469fa4b6afc2be5a6f338edc (diff)
downloadSCons-635256859678b6b862b89d4c5ce890b4923e8394.zip
SCons-635256859678b6b862b89d4c5ce890b4923e8394.tar.gz
SCons-635256859678b6b862b89d4c5ce890b4923e8394.tar.bz2
Error message if no SConstruct file.
Diffstat (limited to 'src/script/scons.py')
-rw-r--r--src/script/scons.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index 9dc41e6..51593eb 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -82,7 +82,6 @@ def _scons_user_error(e):
"""Handle user errors. Print out a message and a description of the
error, along with the line number and routine where it occured.
"""
- print 'user error'
etype, value, tb = sys.exc_info()
while tb.tb_next is not None:
tb = tb.tb_next
@@ -499,11 +498,14 @@ def main():
Scripts.append(file)
break
- if local_help and not Scripts:
- # They specified -h, but there's no SConstruct. Give them
- # the options usage before we try to read it and fail.
- PrintUsage()
- sys.exit(0)
+ if not Scripts:
+ if local_help:
+ # There's no SConstruct, but they specified -h. Give them
+ # the options usage before we try to read it and fail.
+ PrintUsage()
+ sys.exit(0)
+ else:
+ raise UserError, "No SConstruct file found."
# XXX The commented-out code here adds any "scons" subdirs in anything
# along sys.path to sys.path. This was an attempt at setting up things