cleanup: remove useless re-raises of KeyboardInterrupt
authorYuya Nishihara <yuya@tcha.org>
Wed, 03 May 2017 11:16:55 +0900
changeset 32181 b98ee1a808bd
parent 32180 2daba41c3b80
child 32182 ac641a41f98d
cleanup: remove useless re-raises of KeyboardInterrupt KeyboardInterrupt is no longer a subclass of Exception since Python 2.5. https://docs.python.org/2/whatsnew/2.5.html#pep-352-exceptions-as-new-style-classes
mercurial/branchmap.py
mercurial/extensions.py
--- a/mercurial/branchmap.py	Fri Aug 12 11:36:42 2016 +0900
+++ b/mercurial/branchmap.py	Wed May 03 11:16:55 2017 +0900
@@ -67,8 +67,6 @@
             partial.setdefault(label, []).append(node)
             if state == 'c':
                 partial._closednodes.add(node)
-    except KeyboardInterrupt:
-        raise
     except Exception as inst:
         if repo.ui.debugflag:
             msg = 'invalid branchheads cache'
--- a/mercurial/extensions.py	Fri Aug 12 11:36:42 2016 +0900
+++ b/mercurial/extensions.py	Wed May 03 11:16:55 2017 +0900
@@ -171,8 +171,6 @@
                 continue
         try:
             load(ui, name, path)
-        except KeyboardInterrupt:
-            raise
         except Exception as inst:
             inst = _forbytes(inst)
             if path: