core: added get method to PersistentDictionary

This commit is contained in:
Goffi 2011-12-03 22:21:52 +01:00
commit 0a1047bf45

View file

@ -104,6 +104,9 @@ class PersistentDict:
self.storage.delIndPrivate(self.namespace, key, self.profile)
return self._cache.__delitem__(key)
def get(self, key, default=None):
return self._cache.get(key, default)
def force(self, name):
"""Force saving of an attribute to storage
@return: deferred fired when data is actually saved"""