Mercurial > piecrust2
comparison piecrust/processing/base.py @ 207:c5330cb35794
processing: Don't fail if an asset we want to remove has already been removed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 22 Jan 2015 22:23:20 -0800 |
parents | e725af1d48fb |
children | 989d0abd7c17 |
comparison
equal
deleted
inserted
replaced
206:cba781477bd0 | 207:c5330cb35794 |
---|---|
244 | 244 |
245 # Handle deletions. | 245 # Handle deletions. |
246 if delete and not new_only: | 246 if delete and not new_only: |
247 for path, reason in record.getDeletions(): | 247 for path, reason in record.getDeletions(): |
248 logger.debug("Removing '%s': %s" % (path, reason)) | 248 logger.debug("Removing '%s': %s" % (path, reason)) |
249 os.remove(path) | 249 try: |
250 os.remove(path) | |
251 except FileNotFoundError: | |
252 pass | |
250 logger.info('[delete] %s' % path) | 253 logger.info('[delete] %s' % path) |
251 | 254 |
252 # Invoke post-processors. | 255 # Invoke post-processors. |
253 for proc in self.processors: | 256 for proc in self.processors: |
254 proc.onPipelineEnd(self) | 257 proc.onPipelineEnd(self) |