py3: add inline comment about encoding issue of str(Abort()) stable 5.2
authorYuya Nishihara <yuya@tcha.org>
Tue, 05 Nov 2019 21:35:19 +0900
branchstable
changeset 43418 ca3dca416f8d
parent 43417 822202e72f69
child 43419 1d4beab7a3d2
py3: add inline comment about encoding issue of str(Abort())
mercurial/error.py
--- a/mercurial/error.py	Tue Nov 05 21:29:40 2019 +0900
+++ b/mercurial/error.py	Tue Nov 05 21:35:19 2019 +0900
@@ -114,6 +114,9 @@
     if pycompat.ispy3:
 
         def __str__(self):
+            # 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__())