[pygtk] gio.File.replace_contents* does not return on remote files

Gian Mario Tagliaretti gianmt at gnome.org
Fri May 15 02:00:46 WST 2009


On Thu, May 14, 2009 at 7:11 PM, Mystilleef <mystilleef a gmail.com> wrote:
> 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?

could you post a code snippet that shows the problem?

> 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?

yes it is intentional, in the C API the pass "char **new_etag" to the
function where to store the returned string, in python we have to
return the string from the method.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gianmt a gnome.org


More information about the pygtk mailing list