Fix pep8 support in src/memory.

This commit is contained in:
Emmanuel Gil Peyrot 2013-01-18 17:55:35 +01:00
commit 45488f486c

View file

@ -21,11 +21,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
from logging import debug, info, warning, error
class MemoryNotInitializedError(Exception):
pass
class PersistentDict(object):
"""A dictionary which save persistently each value assigned
r"""A dictionary which save persistently each value assigned
/!\ be careful, each assignment means a database write
/!\ Memory must be initialised before loading/setting value with instances of this class"""
storage = None
@ -81,9 +83,6 @@ class PersistentDict(object):
def __nonzero__(self):
return self._cache.__len__()
def __unicode__(self):
return self._cache.__unicode__()
def __contains__(self, key):
return self._cache.__contains__(key)
@ -146,4 +145,3 @@ class PersistentBinaryDict(PersistentDict):
if not self.profile:
return self.storage.setGenPrivateBinary(self.namespace, name, self._cache[name])
return self.storage.setIndPrivateBinary(self.namespace, name, self._cache[name], self.profile)