aboutsummaryrefslogtreecommitdiffstats
path: root/examples/flowwriter.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-06-13 18:17:09 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-06-13 18:17:09 -0700
commit63c6660895c83967c5d93499bcda3e233f722ded (patch)
treedae83636f6fa7b40e2822197b32963c8d2195417 /examples/flowwriter.py
parent804efe9d38449d484a37430459d1af45c7fcf0cf (diff)
downloadmitmproxy-63c6660895c83967c5d93499bcda3e233f722ded.tar.gz
mitmproxy-63c6660895c83967c5d93499bcda3e233f722ded.tar.bz2
mitmproxy-63c6660895c83967c5d93499bcda3e233f722ded.zip
update examples, tests, docs
Diffstat (limited to 'examples/flowwriter.py')
-rw-r--r--examples/flowwriter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/flowwriter.py b/examples/flowwriter.py
index 8fb8cc60..cb5ccb0d 100644
--- a/examples/flowwriter.py
+++ b/examples/flowwriter.py
@@ -4,14 +4,14 @@ import sys
from mitmproxy.flow import FlowWriter
-def start(context, argv):
- if len(argv) != 2:
+def start(context):
+ if len(sys.argv) != 2:
raise ValueError('Usage: -s "flowriter.py filename"')
- if argv[1] == "-":
+ if sys.argv[1] == "-":
f = sys.stdout
else:
- f = open(argv[1], "wb")
+ f = open(sys.argv[1], "wb")
context.flow_writer = FlowWriter(f)