From c56ca19d7d17e4e5c0303211758ce4771956c37a Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 3 Apr 2020 17:18:35 +0200 Subject: fix nonblocking example this fixes #3877 --- examples/complex/nonblocking.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/complex/nonblocking.py b/examples/complex/nonblocking.py index 72c9c0ab..214f75e9 100644 --- a/examples/complex/nonblocking.py +++ b/examples/complex/nonblocking.py @@ -6,7 +6,7 @@ from mitmproxy import ctx @concurrent # Remove this and see what happens def request(flow): - # You don't want to use mitmproxy.ctx from a different thread - ctx.log.info("handle request: %s%s" % (flow.request.host, flow.request.path)) + # This is ugly in mitmproxy's UI, but you don't want to use mitmproxy.ctx.log from a different thread. + print("handle request: %s%s" % (flow.request.host, flow.request.path)) time.sleep(5) - ctx.log.info("start request: %s%s" % (flow.request.host, flow.request.path)) + print("start request: %s%s" % (flow.request.host, flow.request.path)) -- cgit v1.2.3