diff options
author | phil plante <unhappyrobot@gmail.com> | 2013-01-24 20:46:50 -0800 |
---|---|---|
committer | phil plante <unhappyrobot@gmail.com> | 2013-01-24 20:46:50 -0800 |
commit | 68952d579ec98983257cecf89c6c24507272740f (patch) | |
tree | 076ca13bce82db27d8af13e6fface3726171261d /libmproxy/tnetstring.py | |
parent | 25cb9471f08333cf93ba6cb23079a1c4876292af (diff) | |
download | mitmproxy-68952d579ec98983257cecf89c6c24507272740f.tar.gz mitmproxy-68952d579ec98983257cecf89c6c24507272740f.tar.bz2 mitmproxy-68952d579ec98983257cecf89c6c24507272740f.zip |
Force flush of file content in dump
The dump file would be end up corrupted sometimes when working with mitmdump in a VM. Adding an explicit flush seems to have resolved the file sync issues.
Diffstat (limited to 'libmproxy/tnetstring.py')
-rw-r--r-- | libmproxy/tnetstring.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmproxy/tnetstring.py b/libmproxy/tnetstring.py index d9be19bc..58519675 100644 --- a/libmproxy/tnetstring.py +++ b/libmproxy/tnetstring.py @@ -101,6 +101,7 @@ def dump(value,file,encoding=None): the given file. """ file.write(dumps(value,encoding)) + file.flush() def _rdumpq(q,size,value,encoding=None): |