b274da7 Replace file.flush() calls with flush_sync() helper

5 files Authored by abiagion 5 years ago, Committed by cheimes 5 years ago,
    Replace file.flush() calls with flush_sync() helper
    
    Calls to `os.fsync(f.fileno())` need to be accompained by `f.flush()`.
    
    Commit 8bbeedc93fd442cbbb9bb70e5f446011e95211db introduces the helper
    `ipapython.ipautil.flush_sync()`, which handles all calls in the right
    order.
    
    However, `flush_sync()` takes as parameter a file object with fileno
    and name, where name must be a path to the file, this isn't possible
    in some cases where file descriptors are used.
    
    Issue: https://pagure.io/freeipa/issue/7251
    
    Signed-off-by: Armando Neto <abiagion@redhat.com>
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    
        
file modified
+3 -4
file modified
+2 -2
file modified
+2 -0