diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-03-20 19:32:03 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-03-20 19:32:03 (GMT) |
commit | bcc2c125f832dce5ec7f29f3e363e3769673713d (patch) | |
tree | b183809659297a25b5020879e3e265c61e3da3ab /Lib/doctest.py | |
parent | 1abca4a5151c4685c035e836895c0b98d0f7d0f3 (diff) | |
download | cpython-bcc2c125f832dce5ec7f29f3e363e3769673713d.zip cpython-bcc2c125f832dce5ec7f29f3e363e3769673713d.tar.gz cpython-bcc2c125f832dce5ec7f29f3e363e3769673713d.tar.bz2 |
Change raw "except:" constructs to pass on KeyboardInterrupt.
Bugfix candidate? Don't know -- never bothered me, but it's minor
either way.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 2829f1e..db120a1 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -430,6 +430,8 @@ def _run_examples_inner(out, fakeout, examples, globs, verbose, name, compileflags, 1) in globs got = fakeout.get() state = OK + except KeyboardInterrupt: + raise except: # See whether the exception was expected. if want.find("Traceback (innermost last):\n") == 0 or \ @@ -521,6 +523,8 @@ def run_docstring_examples(f, globs, verbose=0, name="NoName", # just in case CT invents a doc object that has to be forced # to look like a string <0.9 wink> doc = str(doc) + except KeyboardInterrupt: + raise except: return 0, 0 |