How to detect D-Bus errors?

achillean surtri surtri at gmail.com
Fri Jun 20 10:22:01 PDT 2008


Hi,

I have a python dbus program that connects to a service that isn't always
available. When it's available, everything works just fine, but as soon as
the service goes down or gets restarted I get ServiceUnknown errors printed
to stderr.

Unfortunately, those errors don't raise exceptions and as such I'm a bit at
a loss to how I can detect when a service has become unavailable. Optimally,
I would like to detect those errors and then attempt to re-initialize the
connection to the service.

I've looked at the validate_* set of functions, but they only seem to check
the semantics of the string, not whether the underlying object/ interface
etc. is valid.

Any help would be greatly appreciated.

Thanks,

-John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080620/0da5c937/attachment.html 


More information about the dbus mailing list