From 3a89c84eafebfcfec331714df8a23126c90c67dd Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 19 Mar 2014 17:18:21 +0100 Subject: [PATCH] add requests to requrements, improve error logging --- libmproxy/protocol/http.py | 5 ++++- setup.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index a1be6a17c..bd850967c 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -946,7 +946,10 @@ class HTTPHandler(ProtocolHandler, TemporaryServerChangeMixin): if code: err = "%s: %s" % (code, message) else: - err = error.__class__ + try: + err = str(error) + except: + err = error.__class__ self.c.log("error: %s" % err, level="info") diff --git a/setup.py b/setup.py index ffc6cc7c0..09213fcdf 100644 --- a/setup.py +++ b/setup.py @@ -102,6 +102,7 @@ setup( "netlib>=%s"%version.MINORVERSION, "urwid>=1.1", "pyasn1>0.1.2", + "requests>=1.2.2", "pyopenssl>=0.14", "Pillow>=2.3.0", "lxml",