diff src/memory/memory.py @ 553:2b3e3349f6a4

core: fixed presence cache error
author Goffi <goffi@goffi.org>
date Thu, 06 Dec 2012 22:11:41 +0100
parents 2c4016921403
children 14dcbcdb6222
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