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

now return empty Attributes to avoid timeout if you don't have attributes

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/fork@1533 b32b6428-25c9-4566-ad07-03861ab6144f
parent c52bc78e
No related branches found
No related tags found
No related merge requests found
......@@ -203,7 +203,7 @@ class Engine(object):
"""
try:
result = run_action(msg, target)
if result:
if result != None:
self.send_reply(dev=target,targets=[msg.source],action=msg.action,body=result)
except DeviceError as e:
self.send_error(target, e.code, e.description)
......
......@@ -39,7 +39,6 @@ class Attribute(object):
self.name = name
self.default = default
self.device = dev
self.status = "update"
self.__value = default
@property
......@@ -199,36 +198,18 @@ class Device(object):
"""Process attributes filter"""
for attr in attributes:
if attr in dev_attr.keys():
# Warning: just to test because error msg not yet specified
# in spec.
if dev_attr[attr].status == "update":
result.update({dev_attr[attr].name: dev_attr[attr].value})
else:
logger.debug('Not Yet Implemented')
else:
# Todo: raise error???
# Problem??? because raise error and do not process other
# attributes if others are good
# raise XAALInternalError("Attribute %s not found" % attr)
logger.debug("Attribute %s not found" % attr)
else:
"""Process all attributes"""
for attr in dev_attr.values():
# Warning: just to test because spec. are needed to define
# error msg
if attr.status == "update":
result.update({attr.name: attr.value})
else:
logger.debug('Not Yet Implemented')
return result
getAttributes.exposed = True
def find_dev_methods(dev):
""" loop throught the object to find and .exposed
functions attributes"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment