From 29bcbd57d54688b9b4d38f83e7cfe52af501ab56 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 28 Jul 2013 21:05:17 +0200 Subject: fix #144 netlib wraps IOError in NetLibDisconnect, so we need to cover this as well. --- libmproxy/proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmproxy') diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index df810da5..ae5cd7d3 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -85,7 +85,7 @@ class ServerConnection(tcp.TCPClient): if self.connection: try: self.wfile.flush() - except IOError: # pragma: no cover + except IOError, tcp.NetLibDisconnect: # pragma: no cover pass try: self.connection.close() -- cgit v1.2.3