[pygtk] gio.File.replace_contents* does not return on remote files
Mystilleef
mystilleef at gmail.com
Sun May 17 08:40:20 WST 2009
On Thu, May 14, 2009 at 1:11 PM, Mystilleef <mystilleef at gmail.com> wrote:
> Hello,
>
>>>> gio.pygio_version
> (2, 16, 1)
>
> Calling gio.File's replace_contents or replace_contents_async on a file
> at a remote location does not return. The file gets replaced but the
> function does not return. I don't have this problem with local files. Is
> this a bug? Can anyone else reproduce this problem? I'm I doing
> something wrong?
>
> For the asynchronous operation, calling replace_contents_finish with the
> result argument does not return. It just hangs indefinitely.
>
> Also in the C gio API reference manual, replace_contents_finish is
> supposed to return a boolean value indicating success or failure.
> However, the python binding returns a string. Is this intentional?
>
My solution is to use gio.File.replace_async. It works fine for local
and remote files.
Cheers
More information about the pygtk
mailing list