diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-02-08 12:01:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 12:01:32 +0100 |
commit | 79354c0b43fd7449b931037b9a4e43a5bb85a21d (patch) | |
tree | 0a077d07fdb37850c08a473a32103450dc224d7c /examples/complex/har_dump.py | |
parent | 2316c0fb74efefd76970c685b8f77f45834f1490 (diff) | |
parent | c622622c5924b291db302aa22f4d82608677ceed (diff) | |
download | mitmproxy-79354c0b43fd7449b931037b9a4e43a5bb85a21d.tar.gz mitmproxy-79354c0b43fd7449b931037b9a4e43a5bb85a21d.tar.bz2 mitmproxy-79354c0b43fd7449b931037b9a4e43a5bb85a21d.zip |
Merge pull request #1984 from ujjwal96/har_dump-fix
Fixes #1978
Diffstat (limited to 'examples/complex/har_dump.py')
-rw-r--r-- | examples/complex/har_dump.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/complex/har_dump.py b/examples/complex/har_dump.py index 62011903..f7c1e658 100644 --- a/examples/complex/har_dump.py +++ b/examples/complex/har_dump.py @@ -7,6 +7,7 @@ import json import sys import base64 import zlib +import os from datetime import datetime import pytz @@ -166,7 +167,7 @@ def done(): if dump_file.endswith('.zhar'): raw = zlib.compress(raw, 9) - with open(dump_file, "wb") as f: + with open(os.path.expanduser(dump_file), "wb") as f: f.write(raw) mitmproxy.ctx.log("HAR dump finished (wrote %s bytes to file)" % len(json_dump)) |