diff mercurial/commands.py @ 2153:635653cd73ab

move SignalInterrupt class into util module.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 28 Apr 2006 14:50:23 -0700
parents 6447a32aefce
children ec96c4518236
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Apr 28 12:38:11 2006 +0200
+++ b/mercurial/commands.py	Fri Apr 28 14:50:23 2006 -0700
@@ -3260,11 +3260,8 @@
 
     raise UnknownCommand(cmd)
 
-class SignalInterrupt(Exception):
-    """Exception raised on SIGTERM and SIGHUP."""
-
 def catchterm(*args):
-    raise SignalInterrupt
+    raise util.SignalInterrupt
 
 def run():
     sys.exit(dispatch(sys.argv[1:]))
@@ -3464,7 +3461,7 @@
                (inst.desc or inst.filename, inst.strerror))
     except revlog.RevlogError, inst:
         u.warn(_("abort: "), inst, "!\n")
-    except SignalInterrupt:
+    except util.SignalInterrupt:
         u.warn(_("killed!\n"))
     except KeyboardInterrupt:
         try: