Mercurial > piecrust2
diff 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 |
line wrap: on
line diff
--- a/piecrust/baking/records.py Sat Aug 16 08:15:30 2014 -0700 +++ b/piecrust/baking/records.py Sat Aug 16 15:07:22 2014 -0700 @@ -65,7 +65,14 @@ self.current.entry_added += self._onCurrentEntryAdded def loadPrevious(self, previous_path): - self.previous = BakeRecord.load(previous_path) + try: + self.previous = BakeRecord.load(previous_path) + except Exception as ex: + logger.debug("Error loading previous record: %s" % ex) + logger.debug("Will reset to an empty one.") + self.previous = BakeRecord() + return + for e in self.previous.entries: self.transitions[e.transition_key] = (e, None)