diff tools/memory.py @ 64:d46f849664aa

SàT: multi-profile, plugins updated - core: 2 new convenient methods: getJidNStream and getClient - new param in plugin info: "handler" to know if there is a handler to plug on profiles clients - plugins with handler now use an other class which is returned to profile client with the new method "getHandler" and pluged when connecting
author Goffi <goffi@goffi.org>
date Sat, 30 Jan 2010 16:17:33 +1100
parents 0db25931b60d
children d35c5edab53f
line wrap: on
line diff
--- a/tools/memory.py	Fri Jan 29 14:17:15 2010 +1100
+++ b/tools/memory.py	Sat Jan 30 16:17:33 2010 +1100
@@ -224,7 +224,10 @@
             error('Requesting a param for an non-existant profile')
             return None
 
-        return self.__getParam(profile, category, name) or node[1].getAttribute(attr)
+        if attr == "value": 
+            return self.__getParam(profile, category, name) or node[1].getAttribute(attr)
+        else:
+            return node[1].getAttribute(attr)
 
 
     def __getParam(self, profile, category, name, type='individual'):
@@ -550,8 +553,8 @@
         debug ("Memory getPresenceStatus (%s)", self.presenceStatus)
         return self.presenceStatus
 
-    def getParamA(self, name, category, attr="value"):
-        return self.params.getParamA(name, category, attr)
+    def getParamA(self, name, category, attr="value", profile_key="@DEFAULT@"):
+        return self.params.getParamA(name, category, attr, profile_key)
     
     def getParams(self):
         return self.params.getParams()