How could I control a DBus timeout with PolicyKit?
Will Thompson
will.thompson at collabora.co.uk
Fri Oct 1 03:22:24 PDT 2010
On 01/10/10 08:53, Mario wrote:
> My code:
> ...........
> try:
> (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)
> except:
> raise #<----- This not get the timeout exception.
> ............
>
>
> The exception:
> user at ubuntu:~/Desktop$ python 1.py
> Traceback (most recent call last):
> File "1.py", line 5, in<module>
> print(iface.fw_unblock())
> File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
> return self._proxy_method(*args, **keywords)
> File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
> **keywords)
> File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in
> call_blocking
> message, timeout)
This backtrace isn't from the method call you show in your code, which
would be why its try: ... except: ... wrapper isn't doing much. :)
--
Will
More information about the dbus
mailing list