diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-09 10:28:01 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-09 10:28:01 +1200 |
commit | 3749d52b66d7db47188459c36d316136fee5f317 (patch) | |
tree | af838d13ac6e890fba3cc390a4b18ceb247d1baa /libmproxy/console | |
parent | 729fd9301f03550a253a8f44e095bb5b1d3f3152 (diff) | |
download | mitmproxy-3749d52b66d7db47188459c36d316136fee5f317.tar.gz mitmproxy-3749d52b66d7db47188459c36d316136fee5f317.tar.bz2 mitmproxy-3749d52b66d7db47188459c36d316136fee5f317.zip |
Make mitmproxy "W" over-write, not append.
The -w options in mitmdump and mitproxy should do the same thing. Append can
have unexpected consequences if the existing file is not a mitmdump.
Diffstat (limited to 'libmproxy/console')
-rw-r--r-- | libmproxy/console/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index f770531a..458f739b 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -411,7 +411,7 @@ class ConsoleMaster(flow.FlowMaster): def start_stream(self, path): path = os.path.expanduser(path) try: - f = file(path, "ab") + f = file(path, "wb") flow.FlowMaster.start_stream(self, f) except IOError, v: return str(v) |