Mercurial > libervia-backend
comparison src/memory/memory.py @ 1214:ed3b01ed70d7
memory: profileSessions.profileGetUnique was not resetting the timer
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 22 Sep 2014 18:42:54 +0200 |
parents | b5928601d7aa |
children | d9c399ec5dd9 |
comparison
equal
deleted
inserted
replaced
1213:b5928601d7aa | 1214:ed3b01ed70d7 |
---|---|
144 - raise an error if more than one session are found | 144 - raise an error if more than one session are found |
145 """ | 145 """ |
146 ids = self._profileGetAllIds(profile) | 146 ids = self._profileGetAllIds(profile) |
147 if len(ids) > 1: | 147 if len(ids) > 1: |
148 raise exceptions.InternalError('profileGetUnique has been used but more than one session has been found!') | 148 raise exceptions.InternalError('profileGetUnique has been used but more than one session has been found!') |
149 return self._sessions[ids[0]][1] if len(ids) == 1 else None | 149 return self.profileGet(ids[0], profile) if len(ids) == 1 else None |
150 | |
150 | 151 |
151 def profileDelUnique(self, profile): | 152 def profileDelUnique(self, profile): |
152 """Delete the unique session that is associated to the given profile. | 153 """Delete the unique session that is associated to the given profile. |
153 | 154 |
154 @param profile: %(doc_profile)s | 155 @param profile: %(doc_profile)s |