core (memory): profile is checked in startSession (an error is raised if it doesn't exist)
This commit is contained in:
parent
3d8d66fa43
commit
1bf3950ce6
2 changed files with 5 additions and 5 deletions
|
|
@ -74,7 +74,7 @@ class SAT(service.Service):
|
|||
self.bridge.register("getEntitiesData", self.memory._getEntitiesData)
|
||||
self.bridge.register("asyncCreateProfile", self.memory.asyncCreateProfile)
|
||||
self.bridge.register("asyncDeleteProfile", self.memory.asyncDeleteProfile)
|
||||
self.bridge.register("profileStartSession", self.memory._startSession)
|
||||
self.bridge.register("profileStartSession", self.memory.startSession)
|
||||
self.bridge.register("profileIsSessionStarted", self.memory._isSessionStarted)
|
||||
self.bridge.register("profileSetDefault", self.memory.profileSetDefault)
|
||||
self.bridge.register("asyncConnect", self._asyncConnect)
|
||||
|
|
|
|||
|
|
@ -318,17 +318,17 @@ class Memory(object):
|
|||
|
||||
## Profiles/Sessions management ##
|
||||
|
||||
def _startSession(self, password, profile_key):
|
||||
profile = self.getProfileName(profile_key)
|
||||
return self.startSession(password, profile)
|
||||
|
||||
def startSession(self, password, profile):
|
||||
""""Iniatialise session for a profile
|
||||
|
||||
@param password(unicode): profile session password
|
||||
or empty string is no password is set
|
||||
@param profile: %(doc_profile)s
|
||||
@raise exceptions.ProfileUnknownError if profile doesn't exists
|
||||
@raise exceptions.PasswordError: the password does not match
|
||||
"""
|
||||
profile = self.getProfileName(profile)
|
||||
|
||||
def createSession(dummy):
|
||||
"""Called once params are loaded."""
|
||||
self._entities_cache[profile] = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue