[pygtk] gio.Mount.get_default_location()

Leon Bogaert leon at tim-online.nl
Sun May 29 23:43:55 WST 2011


I'm migrating my gio code from the static binding to gi.
But I have a problem with a callback.

For example:

def callback():
    pass

location = Gio.file_new_for_uri('ssh://kees@concepts')
mo = Gtk.MountOperation()
location.mount_enclosing_volume(mo, callbackz)

When you run that I get:

Traceback (most recent call last):
  File "test_gi.py", line 82, in <module>
    location.mount_enclosing_volume(mo, 'callbackz')
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 44, in function
    return info.invoke(*args)
TypeError: Error invoking Gio.mount_enclosing_volume: Unexpected value for argument 'callback'

The docs say I also can provide 'None' (http://developer.gnome.org/pygobject/stable/class-giofile.html#method-giofile--mount-enclosing-volume) but that gives the same error.

Is this something not yet implemented or am I doing something wrong?

Regards,
Leon


More information about the pygtk mailing list