verify: remove unreachable code to reraise KeyboardInterrupt
authorYuya Nishihara <yuya@tcha.org>
Sun, 20 Dec 2015 18:38:21 +0900
changeset 27450 467338e690f8
parent 27449 77c51a56392e
child 27451 f209c85183a7
verify: remove unreachable code to reraise KeyboardInterrupt KeyboardInterrupt should never be caught as it doesn't inherit Exception in Python 2.5 or later. And if it was, "interrupted" would be printed twice. https://docs.python.org/2.7/library/exceptions.html#exception-hierarchy
mercurial/verify.py
--- a/mercurial/verify.py	Sun Dec 20 16:34:54 2015 -0600
+++ b/mercurial/verify.py	Sun Dec 20 18:38:21 2015 +0900
@@ -76,9 +76,6 @@
         self.errors[0] += 1
 
     def exc(self, linkrev, msg, inst, filename=None):
-        if isinstance(inst, KeyboardInterrupt):
-            self.ui.warn(_("interrupted"))
-            raise
         if not str(inst):
             inst = repr(inst)
         self.err(linkrev, "%s: %s" % (msg, inst), filename)