hgext/convert/common.py
changeset 6332 950e72fc7cf3
parent 6049 348132c112cf
child 6716 c9b8d2565b92
child 6868 93b03f1be289
--- a/hgext/convert/common.py	Thu Mar 20 22:58:53 2008 +0100
+++ b/hgext/convert/common.py	Thu Mar 20 23:32:43 2008 +0100
@@ -18,10 +18,13 @@
     s = base64.decodestring(s)
     return pickle.loads(s)
 
-def checktool(exe, name=None):
+class MissingTool(Exception): pass
+
+def checktool(exe, name=None, abort=True):
     name = name or exe
     if not util.find_exe(exe):
-        raise util.Abort('cannot find required "%s" tool' % name)
+        exc = abort and util.Abort or MissingTool
+        raise exc(_('cannot find required "%s" tool') % name)
 
 class NoRepo(Exception): pass