comparison mercurial/hook.py @ 25184:819cd397e306

hook: drop dedicated catch for 'KeyboardInterrupt' This is no longer under 'Exception' in Python 2.6.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 18 May 2015 15:40:23 -0500
parents 7046c7e7fcb4
children 2cfb0bbf83a1
comparison
equal deleted inserted replaced
25183:0d0ed375fbdf 25184:819cd397e306
83 # protocol when running through the command server 83 # protocol when running through the command server
84 old = sys.stdout, sys.stderr, sys.stdin 84 old = sys.stdout, sys.stderr, sys.stdin
85 sys.stdout, sys.stderr, sys.stdin = ui.fout, ui.ferr, ui.fin 85 sys.stdout, sys.stderr, sys.stdin = ui.fout, ui.ferr, ui.fin
86 86
87 r = obj(ui=ui, repo=repo, hooktype=name, **args) 87 r = obj(ui=ui, repo=repo, hooktype=name, **args)
88 except KeyboardInterrupt:
89 raise
90 except Exception, exc: 88 except Exception, exc:
91 if isinstance(exc, util.Abort): 89 if isinstance(exc, util.Abort):
92 ui.warn(_('error: %s hook failed: %s\n') % 90 ui.warn(_('error: %s hook failed: %s\n') %
93 (hname, exc.args[0])) 91 (hname, exc.args[0]))
94 else: 92 else: