Я нашел два фрагмента кода на Nullege, которые, кажется, делают свое дело:
try:
retval = gfile.mount_enclosing_volume_finish(result)
except gio.Error, e:
# If we run the tests too fast
if e.code == gio.ERROR_ALREADY_MOUNTED:
print ('WARNING: testfile is already mounted, '
'skipping test')
loop.quit()
return
raise
self.failUnless(retval)
OR
# Already mounted ?
if g_file.query_exists():
self._folder = g_file
else:
mount_operation = MountOperation()
mount_operation.set_anonymous(True)
g_file.mount_enclosing_volume(mount_operation, self._mount_end)