Mercurial > piecrust2
comparison piecrust/processing/pipeline.py @ 434:6238dcfc7a78
reporting: Print errors that occured during pipeline processing.
| author | Ludovic Chabant <ludovic@chabant.com> |
|---|---|
| date | Sat, 27 Jun 2015 21:47:48 -0700 |
| parents | 4a43d7015b75 |
| children | 171dde4f61dc |
comparison
equal
deleted
inserted
replaced
| 433:5be275137056 | 434:6238dcfc7a78 |
|---|---|
| 119 entry = record.getCurrentEntry(res.path) | 119 entry = record.getCurrentEntry(res.path) |
| 120 assert entry is not None | 120 assert entry is not None |
| 121 entry.flags |= res.flags | 121 entry.flags |= res.flags |
| 122 entry.proc_tree = res.proc_tree | 122 entry.proc_tree = res.proc_tree |
| 123 entry.rel_outputs = res.rel_outputs | 123 entry.rel_outputs = res.rel_outputs |
| 124 if entry.flags & FLAG_PROCESSED: | |
| 125 record.current.processed_count += 1 | |
| 124 if res.errors: | 126 if res.errors: |
| 125 entry.errors += res.errors | 127 entry.errors += res.errors |
| 126 record.current.success = False | 128 record.current.success = False |
| 127 if entry.flags & FLAG_PROCESSED: | 129 |
| 128 record.current.processed_count += 1 | 130 rel_path = os.path.relpath(res.path, self.app.root_dir) |
| 131 logger.error("Errors found in %s:" % rel_path) | |
| 132 for e in entry.errors: | |
| 133 logger.error(" " + e) | |
| 129 | 134 |
| 130 pool = self._createWorkerPool() | 135 pool = self._createWorkerPool() |
| 131 expected_result_count = self._process(src_dir_or_file, pool, record) | 136 expected_result_count = self._process(src_dir_or_file, pool, record) |
| 132 self._waitOnWorkerPool(pool, expected_result_count, _handler) | 137 self._waitOnWorkerPool(pool, expected_result_count, _handler) |
| 133 self._terminateWorkerPool(pool) | 138 self._terminateWorkerPool(pool) |
