changeset 553:2b3e3349f6a4

core: fixed presence cache error
author Goffi <goffi@goffi.org>
date Thu, 06 Dec 2012 22:11:41 +0100
parents 6970ab58b020
children caad23285a38
files src/memory/memory.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/memory/memory.py	Sat Nov 24 02:21:02 2012 +0100
+++ b/src/memory/memory.py	Thu Dec 06 22:11:41 2012 +0100
@@ -711,8 +711,8 @@
             return {}
         entities_presence = {}
         for entity in self.entitiesCache[profile]:
-            # if entity exists, "presence" key must exist
-            entities_presence[entity] = self.entitiesCache[profile][entity]["presence"]
+            if "presence" in self.entitiesCache[profile][entity]:
+                entities_presence[entity] = self.entitiesCache[profile][entity]["presence"]
 
         debug ("Memory getPresenceStatus (%s)", entities_presence)
         return entities_presence