[PATCH 3/4] Add a note about when and how to remove isys.sync

Will Woods wwoods at redhat.com
Mon Feb 24 20:44:47 UTC 2014


On Mon, 2014-02-24 at 09:27 -0500, David Shea wrote:
> ---
>  pyanaconda/isys/__init__.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/pyanaconda/isys/__init__.py b/pyanaconda/isys/__init__.py
> index b1f16c6..c216428 100644
> --- a/pyanaconda/isys/__init__.py
> +++ b/pyanaconda/isys/__init__.py
> @@ -57,6 +57,7 @@ EARLY_SWAP_RAM = 896 * 1024
>  
>  ## Flush filesystem buffers.
>  def sync ():
> +    # TODO: This can be replaced with os.sync in Python 3.3
>      return _isys.sync ()

We could just call it from libc:

    # TODO: replace this with os.sync() in Python 3.3
    import ctypes
    libc = ctypes.CDLL("libc.so.6")
    libc.sync()

and then we don't have to wait for Python 3.3! Whee!

-w



More information about the anaconda-patches mailing list