Show More
@@ -217,12 +217,10 class ProgrammingError(Hint, RuntimeErro | |||
|
217 | 217 | """Raised if a mercurial (core or extension) developer made a mistake""" |
|
218 | 218 | |
|
219 | 219 | def __init__(self, msg, *args, **kwargs): |
|
220 | if not isinstance(msg, str): | |
|
221 | # This means we're on Python 3, because we got a | |
|
222 | # bytes. Turn the message back into a string since this is | |
|
223 | # an internal-only error that won't be printed except in a | |
|
224 | # stack traces. | |
|
225 | msg = msg.decode('utf8') | |
|
220 | # On Python 3, turn the message back into a string since this is | |
|
221 | # an internal-only error that won't be printed except in a | |
|
222 | # stack traces. | |
|
223 | msg = pycompat.sysstr(msg) | |
|
226 | 224 | super(ProgrammingError, self).__init__(msg, *args, **kwargs) |
|
227 | 225 | |
|
228 | 226 | __bytes__ = _tobytes |
General Comments 0
You need to be logged in to leave comments.
Login now