python-dbus + static methods
Daniel Tabas
danieloop at gmail.com
Tue Jan 15 05:14:27 PST 2008
Hello,
i'm new working with d-bus in python, and i'm not able to solve a problem.
I'm working in a proyect that needs to communicate a module with a static
class (with a singleton pattern) with a gui. Before changing the code of
the module to adjust to the singleton pattern the communication between this
module and the gui was perfect. But now when i decorate a static method,
when i call it throught dbus the proxy-object says the following:
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 63, in
__call__
return self._proxy_method(*args, **keywords)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 135, in
__call__
**keywords)
File "/var/lib/python-support/python2.5/dbus/connection.py", line 603, in
call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError:
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/dbus/service.py", line 625, in
_message_cb
(candidate_method, parent_method) = _method_lookup(self, method_name,
interface_name)
File "/var/lib/python-support/python2.5/dbus/service.py", line 188, in
_method_lookup
if ("_dbus_is_method" in cls.__dict__[method_name].__dict__
AttributeError: 'classmethod' object has no attribute '__dict__'
Eliminating the @classmethod decorator to the function that is not
recognised seems to work again.
I don't know if i'm doing something wrong, i hope you help me.
Sorry for my english.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080115/da771944/attachment.html
More information about the dbus
mailing list