From 68952d579ec98983257cecf89c6c24507272740f Mon Sep 17 00:00:00 2001 From: phil plante Date: Thu, 24 Jan 2013 20:46:50 -0800 Subject: Force flush of file content in dump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- libmproxy/tnetstring.py | 1 + 1 file changed, 1 insertion(+) (limited to 'libmproxy') 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): -- cgit v1.2.3