Mercurial > libervia-backend
changeset 642:e07a03d52321
core: fix for methods signature
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 08 Sep 2013 15:00:15 +0200 (2013-09-08) |
parents | 49587e170f53 |
children | 262d9d9ad27a |
files | src/memory/memory.py |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memory/memory.py Sat Sep 07 02:03:17 2013 +0200 +++ b/src/memory/memory.py Sun Sep 08 15:00:15 2013 +0200 @@ -33,7 +33,7 @@ SAVEFILE_PARAM_XML = "/param" # xml parameters template SAVEFILE_DATABASE = "/sat.db" - +NO_SECURITY_LIMIT = -1 class Params(object): """This class manage parameters with xml""" @@ -377,9 +377,9 @@ def __constructProfileXml(self, security_limit, profile): """Construct xml for asked profile, filling values when needed /!\ as noticed in doc, don't forget to unlink the minidom.Document - @security_limit: -1 to return all the params. Otherwise sole the - params which have a security level defined *and* lower or equal to - the specified value are returned. + @security_limit: NO_SECURITY_LIMIT (-1) to return all the params. + Otherwise sole the params which have a security level defined *and* + lower or equal to the specified value are returned. @param profile: profile name (not key !) @return: a deferred that fire a minidom.Document of the profile xml (cf warning above) """ @@ -545,7 +545,7 @@ categories.append(cat.getAttribute("name")) return categories - def setParam(self, name, value, category, security_limit=-1, profile_key='@NONE@'): + def setParam(self, name, value, category, security_limit=NO_SECURITY_LIMIT, profile_key='@NONE@'): """Set a parameter, return None if the parameter is not in param xml""" #TODO: use different behaviour depending of the data type (e.g. password encrypted) if profile_key != "@NONE@": @@ -920,19 +920,19 @@ def asyncGetStringParamA(self, name, category, attr="value", profile_key='@NONE@'): return self.params.asyncGetStringParamA(name, category, attr, profile_key) - def getParamsUI(self, security_limit, profile_key): + def getParamsUI(self, security_limit=NO_SECURITY_LIMIT, profile_key='@NONE@'): return self.params.getParamsUI(security_limit, profile_key) - def getParams(self, security_limit, profile_key): + def getParams(self, security_limit=NO_SECURITY_LIMIT, profile_key='@NONE@'): return self.params.getParams(security_limit, profile_key) - def getParamsForCategory(self, category, security_limit, profile_key): + def getParamsForCategory(self, category, security_limit=NO_SECURITY_LIMIT, profile_key='@NONE@'): return self.params.getParamsForCategory(category, security_limit, profile_key) def getParamsCategories(self): return self.params.getParamsCategories() - def setParam(self, name, value, category, security_limit, profile_key): + def setParam(self, name, value, category, security_limit=NO_SECURITY_LIMIT, profile_key='@NONE@'): return self.params.setParam(name, value, category, security_limit, profile_key) def importParams(self, xml):