changeset 218:10f24c62b05b

showrecord: Show the overall status (success/failed) of the bake.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 31 Jan 2015 17:36:01 -0800
parents 1f4c3dae1fe8
children d7a548ebcd58
files piecrust/commands/builtin/baking.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/commands/builtin/baking.py	Sat Jan 31 17:35:36 2015 -0800
+++ b/piecrust/commands/builtin/baking.py	Sat Jan 31 17:36:01 2015 -0800
@@ -108,10 +108,15 @@
             raise Exception("No record has been created for this output path. "
                             "Did you bake there yet?")
 
+        # Show the bake record.
         record = BakeRecord.load(record_cache.getCachePath(record_name))
         logging.info("Bake record for: %s" % record.out_dir)
         logging.info("Last baked: %s" %
                      datetime.datetime.fromtimestamp(record.bake_time))
+        if record.success:
+            logging.info("Status: success")
+        else:
+            logging.error("Status: failed")
         logging.info("Entries:")
         for entry in record.entries:
             if pattern:
@@ -135,12 +140,17 @@
         if not record_cache.has(record_name):
             return
 
+        # Show the pipeline record.
         record = ProcessorPipelineRecord.load(
                 record_cache.getCachePath(record_name))
         logging.info("")
         logging.info("Processing record for: %s" % record.out_dir)
         logging.info("Last baked: %s" %
                      datetime.datetime.fromtimestamp(record.process_time))
+        if record.success:
+            logging.info("Status: success")
+        else:
+            logging.error("Status: failed")
         logging.info("Entries:")
         for entry in record.entries:
             if pattern: