Skip to content
Snippets Groups Projects
Commit 2393c404 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

py3: unimplement RevlogError.__str__()

On Python 2, str(exc) would crash if __str__() returned a unicode containing
non-ASCII characters.
parent 8c8fcb38
No related branches found
No related tags found
No related merge requests found
......@@ -44,14 +44,6 @@
class RevlogError(StorageError):
__bytes__ = _tobytes
def __str__(self):
# avoid cycle, and directly implement unimethod for this
# __str__ to allow delaying the import of encoding until
# someone actually wants the __str__ of a RevlogError (which
# should be very rare).
from . import encoding
return encoding.unifromlocal(_tobytes(self))
class FilteredIndexError(IndexError):
__bytes__ = _tobytes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment