Show More
@@ -260,7 +260,11 b" def atomic_writing(path, text=True, encoding='utf-8', **kwargs):" | |||||
260 | fileobj.close() |
|
260 | fileobj.close() | |
261 | os.remove(tmp_path) |
|
261 | os.remove(tmp_path) | |
262 | raise |
|
262 | raise | |
263 | else: |
|
263 | ||
|
264 | # Flush to disk | |||
|
265 | fileobj.flush() | |||
|
266 | os.fsync(fileobj.fileno()) | |||
|
267 | ||||
264 |
|
|
268 | # Written successfully, now rename it | |
265 |
|
|
269 | fileobj.close() | |
266 |
|
270 |
General Comments 0
You need to be logged in to leave comments.
Login now