Show More
@@ -68,14 +68,12 b' class Error(Hint, Exception):' | |||||
68 | def __bytes__(self): |
|
68 | def __bytes__(self): | |
69 | return self.message |
|
69 | return self.message | |
70 |
|
70 | |||
71 | if pycompat.ispy3: |
|
71 | def __str__(self): | |
72 |
|
72 | # type: () -> str | ||
73 | def __str__(self): |
|
73 | # the output would be unreadable if the message was translated, | |
74 | # type: () -> str |
|
74 | # but do not replace it with encoding.strfromlocal(), which | |
75 | # the output would be unreadable if the message was translated, |
|
75 | # may raise another exception. | |
76 | # but do not replace it with encoding.strfromlocal(), which |
|
76 | return pycompat.sysstr(self.__bytes__()) | |
77 | # may raise another exception. |
|
|||
78 | return pycompat.sysstr(self.__bytes__()) |
|
|||
79 |
|
77 | |||
80 | def format(self): |
|
78 | def format(self): | |
81 | # type: () -> bytes |
|
79 | # type: () -> bytes |
General Comments 0
You need to be logged in to leave comments.
Login now