mercurial/error.py
changeset 46981 abd18d6306f1
parent 46976 f9482db16cef
child 47300 33c0c25d0b0f
--- a/mercurial/error.py	Mon Apr 19 11:10:16 2021 +0200
+++ b/mercurial/error.py	Mon Apr 19 21:31:24 2021 -0700
@@ -311,16 +311,15 @@
 class OutOfBandError(RemoteError):
     """Exception raised when a remote repo reports failure"""
 
-    def __init__(self, *messages, **kwargs):
+    def __init__(self, message=None, hint=None):
         from .i18n import _
 
-        if messages:
-            message = _(b"remote error:\n%s") % b''.join(messages)
+        if message:
             # Abort.format() adds a trailing newline
-            message = message.rstrip(b'\n')
+            message = _(b"remote error:\n%s") % message.rstrip(b'\n')
         else:
             message = _(b"remote error")
-        super(OutOfBandError, self).__init__(message, **kwargs)
+        super(OutOfBandError, self).__init__(message, hint=hint)
 
 
 class ParseError(Abort):