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/protocol/http_replay.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libmproxy/protocol/http_replay.py') diff --git a/libmproxy/protocol/http_replay.py b/libmproxy/protocol/http_replay.py index 9d61d75c..9e2a9735 100644 --- a/libmproxy/protocol/http_replay.py +++ b/libmproxy/protocol/http_replay.py @@ -1,10 +1,9 @@ from __future__ import (absolute_import, print_function, division) import threading from libmproxy.exceptions import ReplayException -from netlib.exceptions import HttpException +from netlib.exceptions import HttpException, TcpException from netlib.http import http1 -from netlib.tcp import NetLibError from ..controller import Channel from ..models import Error, HTTPResponse, ServerConnection, make_connect_request from .base import Kill @@ -89,7 +88,7 @@ class RequestReplayThread(threading.Thread): response_reply = self.channel.ask("response", self.flow) if response_reply == Kill: raise Kill() - except (ReplayException, HttpException, NetLibError) as v: + except (ReplayException, HttpException, TcpException) as v: self.flow.error = Error(repr(v)) if self.channel: self.channel.ask("error", self.flow) -- cgit v1.2.3