How could I control a DBus timeout with PolicyKit?

Mario maacub at
Fri Oct 1 00:53:34 PDT 2010

Hi! I have an application that uses PolicyKit.
If I do nothing (no password, no close window, no cancel button), I
get a DBus timeout.
I try to control it into my service with a "try:", but not works :(
Any idea, please?
Thanks in advance!

My code:
            (is_auth, _, details) = self.polkit.CheckAuthorization(
                    ('unix-process', {'pid': dbus.UInt32(pid, variant_level=1),
                    'start-time': dbus.UInt64(0, variant_level=1)}),
                    privilege, {'': ''}, dbus.UInt32(1), '', timeout=600)
            raise       # <----- This not get the timeout exception.

The exception:
user at ubuntu:~/Desktop$ python
Traceback (most recent call last):
  File "", line 5, in <module>
  File "/usr/lib/pymodules/python2.6/dbus/", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/", line 140, in __call__
  File "/usr/lib/pymodules/python2.6/dbus/", line 620, in
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did
not receive a reply. Possible causes include: the remote application
did not send a reply, the message bus security policy blocked the
reply, the reply timeout expired, or the network connection was
user at ubuntu:~/Desktop$ python

More information about the dbus mailing list