Exemple #1
0
 def writeStateToBundle(self):
     stateName = getStateName(self.state)
     from histo.server.keysets import KeySets
     encodedState = KeySets.encode(0, self.state)
     stream = self.bundle.open(stateName, 'wb')
     self.bundle.unprotect(self.lastProtectedStateName)
     self.bundle.protect(stateName)
     self.lastProtectedStateName = stateName
     from picklestream import PickleStream
     stream = PickleStream(stream)
     with stream as f:
         f.writeObject(encodedState)
Exemple #2
0
 def encodeIndexItem(self):
     from histo.server.keysets import KeySets
     self.encodedIndexItem = KeySets.encode(1, self.indexItem)