Skip to content
Snippets Groups Projects
Commit ca431390 authored by jkerdreu's avatar jkerdreu
Browse files

Back to action..

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2729 b32b6428-25c9-4566-ad07-03861ab6144f
parent 7dc04e6a
Branches
No related tags found
No related merge requests found
......@@ -234,7 +234,7 @@ class Engine(object):
* error returned on the xAAL bus
"""
try:
result = run_method(msg, target)
result = run_action(msg, target)
if result != None:
self.send_reply(dev=target,targets=[msg.source],action=msg.action,body=result)
except CallbackError as e:
......@@ -356,8 +356,8 @@ def filter_msg_for_devices(msg, devices):
results.append(dev)
return results
def run_method(msg,device):
method,params = search_method(msg,device)
def run_action(msg,device):
method,params = search_action(msg,device)
result = None
try:
result = method(**params)
......@@ -367,7 +367,7 @@ def run_method(msg,device):
return result
def search_method(msg, device):
def search_action(msg, device):
"""Extract & run an action (match with exposed method) from a msg
on the selected device.
Return:
......@@ -397,8 +397,6 @@ def search_method(msg, device):
raise XAALError("Method %s not found on device %s" % (msg.action,device))
return result
def get_args_method(method):
""" return the list on arguments for a given python method """
spec = inspect.getargspec(method)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment