From 14a5f405fdf3973f05ca11182e927d145d10d8d6 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 17 Sep 2015 02:13:28 +0200 Subject: use new netlib exceptions --- libmproxy/proxy/root_context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmproxy/proxy/root_context.py') diff --git a/libmproxy/proxy/root_context.py b/libmproxy/proxy/root_context.py index 72243c59..48cb72a0 100644 --- a/libmproxy/proxy/root_context.py +++ b/libmproxy/proxy/root_context.py @@ -5,8 +5,8 @@ import sys import six from libmproxy.exceptions import ProtocolException +from netlib.exceptions import TcpException from netlib.http import ALPN_PROTO_H2, ALPN_PROTO_HTTP1 -from netlib.tcp import NetLibError from ..protocol import ( RawTCPLayer, TlsLayer, Http1Layer, Http2Layer, is_tls_record_magic, ServerConnectionMixin ) @@ -54,7 +54,7 @@ class RootContext(object): try: d = top_layer.client_conn.rfile.peek(3) - except NetLibError as e: + except TcpException as e: six.reraise(ProtocolException, ProtocolException(str(e)), sys.exc_info()[2]) client_tls = is_tls_record_magic(d) -- cgit v1.2.3