Change raw "except:" constructs to pass on KeyboardInterrupt.
Bugfix candidate? Don't know -- never bothered me, but it's minor
either way.
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 @@
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 @@
# 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