bug fix: hanle case if session has not yet been created

This commit is contained in:
Helmut Merz 2011-09-27 13:08:06 +02:00
parent 1d33e55915
commit 1aa90f68a2

View file

@ -43,6 +43,7 @@ class SessionDataContainer(object):
def __getitem__(self, key): def __getitem__(self, key):
client = component.getUtility(IMemcachedClient) client = component.getUtility(IMemcachedClient)
value = client.query(key, ns=self.namespace) value = client.query(key, ns=self.namespace)
if value:
value.parent = self value.parent = self
return value return value