-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Environment: Fedora 23, Python 2.7.11, python-slip 0.6.4, dbus-python 1.2.0, dbus 1.10.8
The example provided on https://fedorahosted.org/python-slip/wiki/SlipDBusService is not working.
-
The Python interpreter throws an error if the scripts are used as it:
Traceback (most recent call last): File "./service.py", line 29, in <module> run_service () File "./service.py", line 22, in run_service example_object = example_object.ExampleObject (name, "/org/example/ExampleObject") UnboundLocalError: local variable 'example_object' referenced before assignment -
Renaming that variable leads to a service that just times out.
% ./service.py & [1] 20622 Running the example dbus service at 'org.example.ExampleService'. % dbus-send --session --print-reply --type=method_call --dest='org.example.ExampleService' '/org/example/ExampleObject' org.example.ExampleObject.hello_world Error 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 broken. [1] + 20622 done ./service.pyWalking through with the debugger, it looks like when slip adds the ASYNC_CALLBACKS tuple, those values confuse dbus.service into thinking the method is an async method. It looks like slip is attempting to remove those dummy ASYNC_CALLBACKS values if the method is not async, but it's not working. When the code returns to
# we're done - the method has got callback functions to reply with if parent_method._dbus_async_callbacks: returnin dbus.service,
parent_methodstill has values in the_dbus_async_callbackstuple.
Metadata
Metadata
Assignees
Labels
No labels