From 6ec97d0b8e1e70e4f2df544bd49c73557ab54c8d Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 15 Mar 2022 21:02:35 +0100 Subject: [PATCH] fix compatibility with Python 3.8 --- mitmproxy/master.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mitmproxy/master.py b/mitmproxy/master.py index 4aeb887d2..5c0b69fdd 100644 --- a/mitmproxy/master.py +++ b/mitmproxy/master.py @@ -70,7 +70,11 @@ class Master: if isinstance(exc, OSError) and exc.errno == 10038: return # suppress https://bugs.python.org/issue43253 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:" + "\n\thttps://github.com/mitmproxy/mitmproxy/issues" )