From bc0f7ae4f63193b4c3cab76b69b834961a2e4949 Mon Sep 17 00:00:00 2001 From: Brendan Wholihan Date: Sat, 20 Oct 2012 16:35:24 +0100 Subject: [PATCH] Amended utils copy so that a warning is produced if a source file is not found in FILES_TO_COPY whilst copying. eg if there is a typo in the file name, or the file is moved. --- pelican/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/utils.py b/pelican/utils.py index 7e9ab4cb..045bd206 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -92,7 +92,8 @@ def copy(path, source, destination, destination_path=None, overwrite=False): elif os.path.isfile(source_): shutil.copy(source_, destination_) logger.info('copying %s to %s' % (source_, destination_)) - + else: + logger.warning('skipped copy %s to %s' % (source_, destination_)) def clean_output_dir(path): """Remove all the files from the output directory"""