From e186ccb3ba5241d26a34ed073800f71452cfb8ab Mon Sep 17 00:00:00 2001 From: Robert Xiao Date: Thu, 3 Feb 2022 03:11:30 -0800 Subject: [PATCH] fix test.helper_tools.dumperview script. Previously, it was throwing the following error: File mitmproxy/addons/dumper.py, line 133, in _echo_request_line elif flow.client_conn.peername: AttributeError: 'bool' object has no attribute 'peername' --- test/helper_tools/dumperview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/helper_tools/dumperview.py b/test/helper_tools/dumperview.py index b672ebaf9..b6ade8c2b 100755 --- a/test/helper_tools/dumperview.py +++ b/test/helper_tools/dumperview.py @@ -22,14 +22,14 @@ def cli(): @cli.command() @click.option('--level', default=1, help='Detail level') def tcp(level): - f1 = tflow.ttcpflow(client_conn=True, server_conn=True) + f1 = tflow.ttcpflow() show(level, [f1]) @cli.command() @click.option('--level', default=1, help='Detail level') def large(level): - f1 = tflow.tflow(client_conn=True, server_conn=True, resp=True) + f1 = tflow.tflow(resp=True) f1.response.headers["content-type"] = "text/html" f1.response.content = b"foo bar voing\n" * 100 show(level, [f1]) @@ -38,11 +38,11 @@ def large(level): @cli.command() @click.option('--level', default=1, help='Detail level') def small(level): - f1 = tflow.tflow(client_conn=True, server_conn=True, resp=True) + f1 = tflow.tflow(resp=True) f1.response.headers["content-type"] = "text/html" f1.response.content = b"Hello!" - f2 = tflow.tflow(client_conn=True, server_conn=True, err=True) + f2 = tflow.tflow(err=True) show( level,