[PATCH 1 of 4] error: refactor OutOfBandError to inherrit from HintException

timeless timeless at mozdev.org
Wed Dec 23 17:58:50 UTC 2015


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450892304 0
#      Wed Dec 23 17:38:24 2015 +0000
# Node ID 96379fd1a2478dc4702844e5518396fee28d7414
# Parent  fe376159a58d9b3d748b669ac011b0eed0346fea
error: refactor OutOfBandError to inherrit from HintException

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -78,13 +78,9 @@
         from .i18n import _
         Abort.__init__(self, _('response expected'))
 
-class OutOfBandError(Exception):
+class OutOfBandError(HintException):
     """Exception raised when a remote repo reports failure"""
 
-    def __init__(self, *args, **kw):
-        Exception.__init__(self, *args)
-        self.hint = kw.get('hint')
-
 class ParseError(Exception):
     """Raised when parsing config files and {rev,file}sets (msg[, pos])"""
 


More information about the Mercurial-devel mailing list