connect method of SyncdaemonDaemon object conflicts with connect from GObject

Bug #620735 reported by Roman Yepishev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Confirmed
High
Ubuntu One Client Engineering team

Bug Description

Installed ubuntuone-client: 1.3.8-0ubuntu2

GObject connect() method is overriden by libsyncdaemon bindings leading to the following code causing an exception:

Traceback (most recent call last):
  File "syncdaemon-test.py", line 10, in <module>
    connection = daemon.connect("got_published_files", got_published_files)
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/types.py", line 40, in function
    return info.invoke(*args)
TypeError: connect() takes exactly 1 argument(s) (3 given)

libsyncdaemon bindings for connect/disconnect will need to be renamed for GObject introspection to work with python.

The lists passed as gpointers will also need to be translated to other types since the following code will not work even after that:
#!/usr/bin/env python
import gobject
from gi.repository import SyncDaemon
def got_published_files(parama, paramb):
    print parama, paramb
daemon = SyncDaemon.Daemon()
connection = daemon.connect("got_published_files", got_published_files)
publicfiles = SyncDaemon.PublicfilesInterface.new(daemon)
files = publicfiles.get_public_files()
loop = gobject.MainLoop()
loop.run()

Revision history for this message
Roman Yepishev (rye) wrote :

The workaround for that is to use daemon.connect_after()

summary: - libsyncdaemon gobject introspection cannot be used from python
+ connect method of SyncdaemonDaemon object conflicts with connect from
+ GObject
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.