##// END OF EJS Templates
error: move SignalInterrupt...
Matt Mackall -
r7644:182b7114 default
parent child Browse files
Show More
@@ -26,7 +26,7 b' def dispatch(args):'
26 26
27 27 def _runcatch(ui, args):
28 28 def catchterm(*args):
29 raise util.SignalInterrupt
29 raise error.SignalInterrupt
30 30
31 31 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
32 32 num = getattr(signal, name, None)
@@ -74,7 +74,7 b' def _runcatch(ui, args):'
74 74 (inst.desc or inst.filename, inst.strerror))
75 75 except error.RevlogError, inst:
76 76 ui.warn(_("abort: %s!\n") % inst)
77 except util.SignalInterrupt:
77 except error.SignalInterrupt:
78 78 ui.warn(_("killed!\n"))
79 79 except KeyboardInterrupt:
80 80 try:
@@ -56,3 +56,6 b' class UnknownCommand(Exception):'
56 56 class AmbiguousCommand(Exception):
57 57 """Exception raised if command shortcut matches more than one command."""
58 58
59 # derived from KeyboardInterrupt to simplify some breakout code
60 class SignalInterrupt(KeyboardInterrupt):
61 """Exception raised on SIGTERM and SIGHUP."""
@@ -75,7 +75,7 b' def loadall(ui):'
75 75 path = os.path.expanduser(path)
76 76 try:
77 77 load(ui, name, path)
78 except (util.SignalInterrupt, KeyboardInterrupt):
78 except KeyboardInterrupt:
79 79 raise
80 80 except Exception, inst:
81 81 if path:
@@ -49,7 +49,7 b' def _pythonhook(ui, repo, name, hname, f'
49 49 (hname, funcname))
50 50 try:
51 51 r = obj(ui=ui, repo=repo, hooktype=name, **args)
52 except (KeyboardInterrupt, util.SignalInterrupt):
52 except KeyboardInterrupt:
53 53 raise
54 54 except Exception, exc:
55 55 if isinstance(exc, util.Abort):
@@ -412,7 +412,7 b' class localrepository(repo.repository):'
412 412 if not l: continue
413 413 node, label = l.split(" ", 1)
414 414 partial[label.strip()] = bin(node)
415 except (KeyboardInterrupt, util.SignalInterrupt):
415 except KeyboardInterrupt:
416 416 raise
417 417 except Exception, inst:
418 418 if self.ui.debugflag:
@@ -185,9 +185,6 b' extendeddateformats = defaultdateformats'
185 185 "%b %Y",
186 186 )
187 187
188 class SignalInterrupt(Exception):
189 """Exception raised on SIGTERM and SIGHUP."""
190
191 188 # differences from SafeConfigParser:
192 189 # - case-sensitive keys
193 190 # - allows values that are not strings (this means that you may not
General Comments 0
You need to be logged in to leave comments. Login now