diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-03-19 17:18:21 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-03-19 17:18:21 +0100 |
commit | 3a89c84eafebfcfec331714df8a23126c90c67dd (patch) | |
tree | ffe993ac1eb2737aa5402f690b50e5073c85ce88 | |
parent | 6924eb75bf20776ef9834e854c73cfb74db732e1 (diff) | |
download | mitmproxy-3a89c84eafebfcfec331714df8a23126c90c67dd.tar.gz mitmproxy-3a89c84eafebfcfec331714df8a23126c90c67dd.tar.bz2 mitmproxy-3a89c84eafebfcfec331714df8a23126c90c67dd.zip |
add requests to requrements, improve error logging
-rw-r--r-- | libmproxy/protocol/http.py | 5 | ||||
-rw-r--r-- | setup.py | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index a1be6a17..bd850967 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") @@ -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", |