diff options
-rwxr-xr-x | Lib/test/regrtest.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 1734eba..e7601c8 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -334,7 +334,15 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, tracer.runctx('runtest(test, generate, verbose, quiet, testdir)', globals=globals(), locals=vars()) else: - ok = runtest(test, generate, verbose, quiet, testdir, huntrleaks) + try: + ok = runtest(test, generate, verbose, quiet, testdir, + huntrleaks) + except KeyboardInterrupt: + # print a newline separate from the ^C + print + break + except: + raise if ok > 0: good.append(test) elif ok == 0: |