add file flush

This commit is contained in:
jmwang66 2023-02-07 12:29:57 +08:00
parent 4f5b9354d0
commit 7695f2b141

View File

@ -57,6 +57,7 @@ class DatadirWriter:
self.keys.add(key)
self.fd.write(f"{key} {value}\n")
self.fd.flush()
def __exit__(self, exc_type, exc_val, exc_tb):
self.close()