From 01a449b5cb1106a867a6b73cd4877e9b2ec68171 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 20 Oct 2016 11:27:05 +1300 Subject: netlib.exceptions.* -> mitmproxy.exceptions --- pathod/protocols/http.py | 4 ++-- pathod/protocols/websockets.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pathod/protocols') diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py index 0822e864..a20a58a1 100644 --- a/pathod/protocols/http.py +++ b/pathod/protocols/http.py @@ -1,5 +1,5 @@ from mitmproxy import version -from netlib.exceptions import TlsException +from mitmproxy import exceptions from netlib.http import http1 from .. import language @@ -37,7 +37,7 @@ class HTTPProtocol: options=self.pathod_handler.server.ssloptions.ssl_options, alpn_select=self.pathod_handler.server.ssloptions.alpn_select, ) - except TlsException as v: + except exceptions.TlsException as v: s = str(v) lg(s) return None, dict(type="error", msg=s) diff --git a/pathod/protocols/websockets.py b/pathod/protocols/websockets.py index df83461a..585a48e3 100644 --- a/pathod/protocols/websockets.py +++ b/pathod/protocols/websockets.py @@ -1,8 +1,8 @@ import time from netlib import websockets -from .. import language -from netlib.exceptions import NetlibException +from pathod import language +from mitmproxy import exceptions class WebsocketsProtocol: @@ -16,7 +16,7 @@ class WebsocketsProtocol: started = time.time() try: frm = websockets.Frame.from_file(self.pathod_handler.rfile) - except NetlibException as e: + except exceptions.NetlibException as e: lg("Error reading websocket frame: %s" % e) return None, None ended = time.time() -- cgit v1.2.3