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:
parent
25cb9471f0
commit
68952d579e
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue