Fix pep8 support in src/memory.
This commit is contained in:
parent
5b54be83bd
commit
45488f486c
1 changed files with 176 additions and 177 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue