diff 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
line wrap: on
line diff
--- a/src/memory/memory.py	Sat Jan 04 21:12:49 2014 +0100
+++ b/src/memory/memory.py	Sat Jan 04 21:13:51 2014 +0100
@@ -556,6 +556,9 @@
                             if not self.checkSecurityLimit(node, security_limit):
                                 dest_cat.removeChild(node)
                                 continue
+                            if not self.checkApp(node, app):
+                                dest_cat.removeChild(node)
+                                continue
                             dest_params[node.getAttribute('name')] = node
                         new_node = True
                     else:
@@ -633,7 +636,7 @@
         profile = self.getProfileName(profile_key)
         if not profile:
             error(_("Asking params for inexistant profile"))
-            return ""
+            return defer.succeed("")
 
         def returnXML(prof_xml):
             return_xml = prof_xml.toxml()