Mercurial > piecrust2
diff piecrust/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 | e88e330eb8dc |
line wrap: on
line diff
--- a/piecrust/records.py Sat Aug 16 08:15:30 2014 -0700 +++ b/piecrust/records.py Sat Aug 16 15:07:22 2014 -0700 @@ -35,7 +35,7 @@ if not os.path.isdir(path_dir): os.makedirs(path_dir, 0o755) - with open(path, 'w') as fp: + with open(path, 'wb') as fp: pickle.dump(self, fp, pickle.HIGHEST_PROTOCOL) def __getstate__(self): @@ -46,6 +46,6 @@ @staticmethod def load(path): logger.debug("Loading bake record from: %s" % path) - with open(path, 'r') as fp: + with open(path, 'rb') as fp: return pickle.load(fp)