Gregory P. Smith <[email protected]> added the comment:
The os module provides a pretty low level simple shim over platform APIs. It is
better for logic like this to live in a higher level application library rather
than make big assumptions on the part of the user.
```
try:
os.fdatasync(fd)
except Exception as err:
logging.debug("fdatasync(fd) failed %s, falling back to fsync(fd)", err)
os.fsync(fd)
```
----------
nosy: +gregory.p.smith
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com