# HG changeset patch # User Augie Fackler <au...@google.com> # Date 1489899762 14400 # Sun Mar 19 01:02:42 2017 -0400 # Node ID bd83fb13fb210ae13eb6325581e164966614f9c5 # Parent 028d4db7b85030b4285342c0dfd1fc7d4bd7e926 error: use pycompat.sysstr to properly pop hints from **kw
Fixes the hint mixin on Python 3. diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -13,7 +13,8 @@ imports. from __future__ import absolute_import -# Do not import anything here, please +# Do not import anything here, please. pycompat is the only exception. +from . import pycompat class Hint(object): """Mix-in to provide a hint of an error @@ -22,7 +23,7 @@ class Hint(object): pass remaining arguments to the exception class. """ def __init__(self, *args, **kw): - self.hint = kw.pop('hint', None) + self.hint = kw.pop(pycompat.sysstr('hint'), None) super(Hint, self).__init__(*args, **kw) class RevlogError(Hint, Exception): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel