dbus-python and signals

Ludvig Ericson ludvig.ericson at gmail.com
Sun Apr 29 12:12:03 PDT 2007


> Date: Sun, 29 Apr 2007 16:21:52 +0100
> From: Simon McVittie <simon.mcvittie at collabora.co.uk>
> Subject: Re: dbus-python and signals
> To: dbus at lists.freedesktop.org
> Message-ID: <20070429152152.GA20667 at celebrin.pseudorandom.co.uk>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, 28 Apr 2007 at 21:31:46 +0200, Ludvig Ericson wrote:
> > The problem is that with dbus-python. I use
> > dbus.proxies.ProxyObject.connect_to_signal to connect a signal to one
> > bound function, and this works fine - the first time.
> > When another signal is given, of the exact same type, interface,
> > busname, everything - it doesn't get called. Not third either, none at
> > all after the first.
>
> That sounds like a bug, either in your code or in dbus-python. Can you
> post a small test case? Hopefully I can either point out what you're
> doing wrong, or use it to track down a bug in dbus-python.
>
> > Maybe I'm understand D-BUS wrong, perhaps it is logical for a signal
> > only to happen once, I don't know if that's the case.
>
> This is not the case. You should be able to receive the same signal
> repeatedly.
>
>         Simon

I appreciate your response but it seems as usual, an error on my side.

It appears to be an error on both sides, however. Not as much a bug in
dbus-python, but a bug in my code and dbus-python keeping it from
appearing.

What it seems it that when an exception is raised in dbus-python
signal handlers, these are not reaching "the surface" - they're
silenced. My error was doing list.append(x, y) which requires a
sequence, not multiple arguments like I showed now.

So in short, keep an extra eye on those signal handlers/receivers,
because at least my exception was caught and damned.

Thanks again, Ludvig Ericson.


More information about the dbus mailing list