From f1c6a5d8de6dbf470805e479899b1a60909a2b92 Mon Sep 17 00:00:00 2001 From: David Kreitschmann Date: May 17 2017 12:07:13 +0000 Subject: Use os.fsync instead of os.fdatasync because macOS doesn't support fdatasync Signed-off-by: David Kreitschmann Reviewed-By: Alexander Bokovoy Reviewed-By: Christian Heimes --- diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py index f21dc4d..34988da 100644 --- a/ipaclient/plugins/vault.py +++ b/ipaclient/plugins/vault.py @@ -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: diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py index 3ecd608..b3fad8f 100644 --- a/ipaclient/remote_plugins/schema.py +++ b/ipaclient/remote_plugins/schema.py @@ -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)