mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-07 10:40:09 +00:00
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.
|
the given file.
|
||||||
"""
|
"""
|
||||||
file.write(dumps(value,encoding))
|
file.write(dumps(value,encoding))
|
||||||
|
file.flush()
|
||||||
|
|
||||||
|
|
||||||
def _rdumpq(q,size,value,encoding=None):
|
def _rdumpq(q,size,value,encoding=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user