diff piecrust/processing/worker.py @ 435:5ceb86818dc5

bug: Fix a crash when errors occur while processing an asset.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 27 Jun 2015 21:48:12 -0700
parents 4a43d7015b75
children 171dde4f61dc
line wrap: on
line diff
--- a/piecrust/processing/worker.py	Sat Jun 27 21:47:48 2015 -0700
+++ b/piecrust/processing/worker.py	Sat Jun 27 21:48:12 2015 -0700
@@ -153,7 +153,7 @@
                 tree_root = builder.build(rel_path)
                 result.flags |= FLAG_PREPARED
         except ProcessingTreeError as ex:
-            result.errors += _get_errors(ex)
+            result.errors = _get_errors(ex)
             return result
 
         # Prepare and run the tree.
@@ -177,7 +177,7 @@
             if isinstance(ex, ProcessorError):
                 ex = ex.__cause__
             # Need to strip out colored errors from external processes.
-            result.errors += _get_errors(ex, strip_colors=True)
+            result.errors = _get_errors(ex, strip_colors=True)
 
         return result