summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-14 19:40:34 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-14 19:40:34 (GMT)
commite83870131b87ea6b343e71d9dc48e7702dce128f (patch)
tree510bd0d424e622071c5e59c51f90a2625959dcd4 /Lib
parent257c772afa48301bc4c55b2bf5e2f5f9cec6e3c8 (diff)
downloadcpython-e83870131b87ea6b343e71d9dc48e7702dce128f.zip
cpython-e83870131b87ea6b343e71d9dc48e7702dce128f.tar.gz
cpython-e83870131b87ea6b343e71d9dc48e7702dce128f.tar.bz2
Don't call sys.exit() all over the place -- simply return the exit
status from main() and call sys.exit(main()) in the startup stub at the end of the file.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/regrtest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index ea4f4ce..3328dc9 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -35,7 +35,7 @@ def main():
except getopt.error, msg:
print msg
print __doc__
- sys.exit(2)
+ return 2
verbose = 0
quiet = 0
generate = 0
@@ -47,7 +47,7 @@ def main():
if o == '-x': exclude = 1
if generate and verbose>1:
print "-g and more than one -v don't go together!"
- sys.exit(2)
+ return 2
good = []
bad = []
skipped = []
@@ -79,7 +79,7 @@ def main():
if skipped and not quiet:
print count(len(skipped), "test"), "skipped:",
print string.join(skipped)
- sys.exit(len(bad) > 0)
+ return len(bad) > 0
stdtests = [
'test_grammar',
@@ -184,4 +184,4 @@ class Compare:
return 0
if __name__ == '__main__':
- main()
+ sys.exit(main())