use protocol 2 for pickling, which may help disk size of the brain a bit
This commit is contained in:
parent
0ff44e1a47
commit
cb54abf2b8
@ -136,7 +136,7 @@ class Brain(object):
|
|||||||
|
|
||||||
def __init__(self, order, file, timeout):
|
def __init__(self, order, file, timeout):
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.db = shelve.open(file, writeback=True)
|
self.db = shelve.open(file, protocol=2, writeback=True)
|
||||||
if self.db.setdefault('api', API_VERSION) != API_VERSION:
|
if self.db.setdefault('api', API_VERSION) != API_VERSION:
|
||||||
raise ValueError('This brain has an incompatible api version: %d != %d' % (self.db['api'], API_VERSION))
|
raise ValueError('This brain has an incompatible api version: %d != %d' % (self.db['api'], API_VERSION))
|
||||||
if self.db.setdefault('order', order) != order:
|
if self.db.setdefault('order', order) != order:
|
||||||
|
Loading…
Reference in New Issue
Block a user