From abc2d28787a3e9ec7e163aea94dc543bbd742005 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Tue, 22 Sep 2015 18:35:59 +0000 Subject: [PATCH] report actual exception, avoid incomprehensible error message "TypeError: NoneType object is not callable" in python2 (apparently due to fact that BaseHTTPServer.BaseHTTPRequestHandler is an old-style class) --- warcprox/mitmproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warcprox/mitmproxy.py b/warcprox/mitmproxy.py index 154d30e..3c3f95b 100644 --- a/warcprox/mitmproxy.py +++ b/warcprox/mitmproxy.py @@ -133,7 +133,7 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler): try: self._proxy_request() except: - self.logger.error("exception from {}".format(self._proxy_request), exc_info=True) + self.logger.error("exception proxying request", exc_info=True) raise def _proxy_request(self):