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.
This commit is contained in:
phil plante 2013-01-24 20:46:50 -08:00
parent 25cb9471f0
commit 68952d579e
1 changed files with 1 additions and 0 deletions

View File

@ -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):