[patch] raise exceptions when you try to use python bindings without a mainloop

Robert McQueen robert.mcqueen at collabora.co.uk
Tue Oct 4 09:40:09 PDT 2005


John (J5) Palmieri wrote:
> The tough thing here is that I might add a generic main loop but there
> is no way to tell that the generic mainloop driver is loaded but the
> user used the glib mainloop.  More grr moments to come :-)  What I will
> do is not add the generic mainloop automatically.  This way a user will
> have to explicitly load it and will hopefully know they have to use that
> mainloop.   The only other place this make sense is if the user does
> pending calls but perhaps in those situations we should spit out a
> warning and then convert it into a blocking call.  I'm not sure.

Yeah, whatever extra mainloop we add I'd always assumed it'd be import
dbus.native or something, so the user always has to make a conscious
choice of mainloop and the warning still holds. If someone asks for an
async call and they've not set up a mainloop properly, blocking their
app seems unwise. I'd just have it bail in that case too. Do you want me
to do that?

Regards,
Rob


More information about the dbus mailing list