use protocol 2 for pickling, which may help disk size of the brain a bit

This commit is contained in:
Brian S. Stephan 2010-12-24 10:36:57 -06:00
parent 0ff44e1a47
commit cb54abf2b8
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class Brain(object):
def __init__(self, order, file, 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:
raise ValueError('This brain has an incompatible api version: %d != %d' % (self.db['api'], API_VERSION))
if self.db.setdefault('order', order) != order: