Mercurial > libervia-backend
comparison src/memory/memory.py @ 779:a978c703bf57
memory: bug fix related to method paramsRegisterApp + getParams was not always returning a Deferred
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 04 Jan 2014 21:13:51 +0100 |
parents | bfafed251b40 |
children | 900987e1c0c4 |
comparison
equal
deleted
inserted
replaced
778:bfafed251b40 | 779:a978c703bf57 |
---|---|
554 if node.nodeName != "param": | 554 if node.nodeName != "param": |
555 continue | 555 continue |
556 if not self.checkSecurityLimit(node, security_limit): | 556 if not self.checkSecurityLimit(node, security_limit): |
557 dest_cat.removeChild(node) | 557 dest_cat.removeChild(node) |
558 continue | 558 continue |
559 if not self.checkApp(node, app): | |
560 dest_cat.removeChild(node) | |
561 continue | |
559 dest_params[node.getAttribute('name')] = node | 562 dest_params[node.getAttribute('name')] = node |
560 new_node = True | 563 new_node = True |
561 else: | 564 else: |
562 # It's not a new node, we use the previously cloned one | 565 # It's not a new node, we use the previously cloned one |
563 dest_cat = cache[category] | 566 dest_cat = cache[category] |
631 @return: XML of parameters | 634 @return: XML of parameters |
632 """ | 635 """ |
633 profile = self.getProfileName(profile_key) | 636 profile = self.getProfileName(profile_key) |
634 if not profile: | 637 if not profile: |
635 error(_("Asking params for inexistant profile")) | 638 error(_("Asking params for inexistant profile")) |
636 return "" | 639 return defer.succeed("") |
637 | 640 |
638 def returnXML(prof_xml): | 641 def returnXML(prof_xml): |
639 return_xml = prof_xml.toxml() | 642 return_xml = prof_xml.toxml() |
640 prof_xml.unlink() | 643 prof_xml.unlink() |
641 return '\n'.join((line for line in return_xml.split('\n') if line)) | 644 return '\n'.join((line for line in return_xml.split('\n') if line)) |