diff options
author | Sandor Nemes <snemes@users.noreply.github.com> | 2016-01-13 15:05:57 +0100 |
---|---|---|
committer | Sandor Nemes <snemes@users.noreply.github.com> | 2016-01-13 15:05:57 +0100 |
commit | 2753af0ec72e542d5a4dc3e5e200bd1638b2b095 (patch) | |
tree | 8968dca61eac1d68288e85d5be1b0c680f015d6c /libmproxy/dump.py | |
parent | fe77dd35c67a0dfbd3004fefe97c689f8cfd3291 (diff) | |
parent | aea3837d4ae637af42f716acb27d7ea8394ece35 (diff) | |
download | mitmproxy-2753af0ec72e542d5a4dc3e5e200bd1638b2b095.tar.gz mitmproxy-2753af0ec72e542d5a4dc3e5e200bd1638b2b095.tar.bz2 mitmproxy-2753af0ec72e542d5a4dc3e5e200bd1638b2b095.zip |
Merge branch 'master' into master
Diffstat (limited to 'libmproxy/dump.py')
-rw-r--r-- | libmproxy/dump.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmproxy/dump.py b/libmproxy/dump.py index 22a2b75c..c2a3268a 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -85,12 +85,12 @@ class DumpMaster(flow.FlowMaster): self.set_stickyauth(options.stickyauth) if options.outfile: - path = os.path.expanduser(options.outfile[0]) - try: - f = open(path, options.outfile[1]) - self.start_stream(f, self.filt) - except IOError as v: - raise DumpError(v.strerror) + err = self.start_stream_to_path( + options.outfile[0], + options.outfile[1] + ) + if err: + raise DumpError(err) if options.replacements: for i in options.replacements: |