Mercurial > piecrust2
comparison piecrust/commands/builtin/baking.py @ 217:1f4c3dae1fe8
bake: Better error handling for site baking.
The site baker now keeps track of whether any worker saw any error. It returns
the current record after a bake.
The `bake` command uses this return value to figure out what kind of exit code
to return.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 31 Jan 2015 17:35:36 -0800 |
parents | a47580a0955b |
children | 10f24c62b05b |
comparison
equal
deleted
inserted
replaced
216:c5ada46b281a | 217:1f4c3dae1fe8 |
---|---|
63 | 63 |
64 def _bakeSources(self, ctx, out_dir): | 64 def _bakeSources(self, ctx, out_dir): |
65 baker = Baker( | 65 baker = Baker( |
66 ctx.app, out_dir, | 66 ctx.app, out_dir, |
67 force=ctx.args.force) | 67 force=ctx.args.force) |
68 baker.bake() | 68 record = baker.bake() |
69 return True | 69 return record.success |
70 | 70 |
71 def _bakeAssets(self, ctx, out_dir): | 71 def _bakeAssets(self, ctx, out_dir): |
72 proc = ProcessorPipeline( | 72 proc = ProcessorPipeline( |
73 ctx.app, out_dir, | 73 ctx.app, out_dir, |
74 force=ctx.args.force) | 74 force=ctx.args.force) |