fix compatibility with Python 3.8

This commit is contained in:
Maximilian Hils 2022-03-15 21:02:35 +01:00
parent e22f8db526
commit 6ec97d0b8e

View File

@ -70,7 +70,11 @@ class Master:
if isinstance(exc, OSError) and exc.errno == 10038: if isinstance(exc, OSError) and exc.errno == 10038:
return # suppress https://bugs.python.org/issue43253 return # suppress https://bugs.python.org/issue43253
self.log.error( self.log.error(
"\n".join(traceback.format_exception(exc)) + "\n".join(traceback.format_exception(
type(exc),
exc,
exc.__traceback__
)) +
"\nPlease lodge a bug report at:" + "\nPlease lodge a bug report at:" +
"\n\thttps://github.com/mitmproxy/mitmproxy/issues" "\n\thttps://github.com/mitmproxy/mitmproxy/issues"
) )