Mercurial > public > mercurial-scm > hg-stable
diff mercurial/error.py @ 48980:9baec00b4ca1
error: unconditionally define __str__
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12292
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 10:27:02 -0700 |
parents | 6000f5b25c9b |
children | 642e31cb55f0 |
line wrap: on
line diff
--- a/mercurial/error.py Mon Feb 21 10:26:25 2022 -0700 +++ b/mercurial/error.py Mon Feb 21 10:27:02 2022 -0700 @@ -68,14 +68,12 @@ def __bytes__(self): return self.message - if pycompat.ispy3: - - def __str__(self): - # type: () -> str - # the output would be unreadable if the message was translated, - # but do not replace it with encoding.strfromlocal(), which - # may raise another exception. - return pycompat.sysstr(self.__bytes__()) + def __str__(self): + # type: () -> str + # the output would be unreadable if the message was translated, + # but do not replace it with encoding.strfromlocal(), which + # may raise another exception. + return pycompat.sysstr(self.__bytes__()) def format(self): # type: () -> bytes