diff options
author | Maximilian Hils <git@maximilianhils.com> | 2020-04-03 17:18:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 17:18:35 +0200 |
commit | c56ca19d7d17e4e5c0303211758ce4771956c37a (patch) | |
tree | 31f331cb25e7e89326b66eb8364b32cfce251c8f /examples | |
parent | e9ab1debeaa770b2d32336c8e451fd5cd77b976a (diff) | |
download | mitmproxy-c56ca19d7d17e4e5c0303211758ce4771956c37a.tar.gz mitmproxy-c56ca19d7d17e4e5c0303211758ce4771956c37a.tar.bz2 mitmproxy-c56ca19d7d17e4e5c0303211758ce4771956c37a.zip |
fix nonblocking example
this fixes #3877
Diffstat (limited to 'examples')
-rw-r--r-- | examples/complex/nonblocking.py | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |