Remove ExceptionInfo.__str__, falling back to __repr__

Fix #5412
This commit is contained in:
Bruno Oliveira
2019-06-06 12:20:32 -03:00
parent 450d264623
commit 65c2a81924
3 changed files with 5 additions and 18 deletions

View File

@@ -534,13 +534,6 @@ class ExceptionInfo:
)
return fmt.repr_excinfo(self)
def __str__(self):
if self._excinfo is None:
return repr(self)
entry = self.traceback[-1]
loc = ReprFileLocation(entry.path, entry.lineno + 1, self.exconly())
return str(loc)
def match(self, regexp):
"""
Check whether the regular expression 'regexp' is found in the string