mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use os.fsync instead of os.fdatasync because macOS doesn't support fdatasync
Signed-off-by: David Kreitschmann <david@kreitschmann.de> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
b8b28c3d09
commit
f1c6a5d8de
@@ -579,7 +579,7 @@ class _TransportCertCache(object):
|
||||
try:
|
||||
f.write(pem)
|
||||
f.flush()
|
||||
os.fdatasync(f.fileno())
|
||||
os.fsync(f.fileno())
|
||||
f.close()
|
||||
os.rename(f.name, filename)
|
||||
except Exception:
|
||||
|
||||
@@ -476,7 +476,7 @@ class Schema(object):
|
||||
try:
|
||||
self._write_schema_data(f)
|
||||
f.flush()
|
||||
os.fdatasync(f.fileno())
|
||||
os.fsync(f.fileno())
|
||||
f.close()
|
||||
except Exception:
|
||||
os.unlink(f.name)
|
||||
|
||||
Reference in New Issue
Block a user