# HG changeset patch # User Martin Geisler # Date 1251485454 -7200 # Node ID 19d91a23458c460f52e2e451adb199360cd1c4fc # Parent a4b761751919b861d7c981635882c29889acb23b run-tests: use parser.error for cmdline option errors diff -r a4b761751919 -r 19d91a23458c tests/run-tests.py --- a/tests/run-tests.py Fri Aug 28 20:28:06 2009 +0200 +++ b/tests/run-tests.py Fri Aug 28 20:50:54 2009 +0200 @@ -176,15 +176,13 @@ raise if options.jobs < 1: - print >> sys.stderr, 'ERROR: -j/--jobs must be positive' - sys.exit(1) + parser.error('-j/--jobs must be positive') if options.interactive and options.jobs > 1: print '(--interactive overrides --jobs)' options.jobs = 1 if options.py3k_warnings: if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0): - print 'ERROR: Py3k warnings switch can only be used on Python 2.6+' - sys.exit(1) + parser.error('Py3k warnings switch can only be used on Python 2.6+') return (options, args)