comparison piecrust/baking/records.py @ 7:343d08ef5668

More PieCrust 3 fixes, and a couple of miscellaneous bug fixes.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Aug 2014 15:07:22 -0700
parents 474c9882decf
children 923699e816d0
comparison
equal deleted inserted replaced
6:f5ca5c5bed85 7:343d08ef5668
63 if previous_path: 63 if previous_path:
64 self.loadPrevious(previous_path) 64 self.loadPrevious(previous_path)
65 self.current.entry_added += self._onCurrentEntryAdded 65 self.current.entry_added += self._onCurrentEntryAdded
66 66
67 def loadPrevious(self, previous_path): 67 def loadPrevious(self, previous_path):
68 self.previous = BakeRecord.load(previous_path) 68 try:
69 self.previous = BakeRecord.load(previous_path)
70 except Exception as ex:
71 logger.debug("Error loading previous record: %s" % ex)
72 logger.debug("Will reset to an empty one.")
73 self.previous = BakeRecord()
74 return
75
69 for e in self.previous.entries: 76 for e in self.previous.entries:
70 self.transitions[e.transition_key] = (e, None) 77 self.transitions[e.transition_key] = (e, None)
71 78
72 def saveCurrent(self, current_path): 79 def saveCurrent(self, current_path):
73 self.current.save(current_path) 80 self.current.save(current_path)