Merge pull request #7561 from nicoddemus/longreprtext-7559

This commit is contained in:
Bruno Oliveira
2020-07-29 09:47:04 -03:00
committed by GitHub
3 changed files with 31 additions and 2 deletions

View File

@@ -82,9 +82,10 @@ class BaseReport:
longrepr.toterminal(out)
else:
try:
out.line(longrepr)
s = str(longrepr)
except UnicodeEncodeError:
out.line("<unprintable longrepr>")
s = "<unprintable longrepr>"
out.line(s)
def get_sections(self, prefix: str) -> Iterator[Tuple[str, str]]:
for name, content in self.sections: