From 2ece08afafdcb3d246a8c1596f9aeafeed9fa7bf Mon Sep 17 00:00:00 2001 From: Stuart Axon Date: Sat, 14 Oct 2017 19:46:16 +0100 Subject: [PATCH] Update pelican_import.py Don't create empty sets in download_attachments, this might fix an issue that came in the tests. --- pelican/tools/pelican_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index a8e323fb..6fddb2be 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -673,7 +673,7 @@ def download_attachments(output_path, urls): if not os.path.exists(full_path): os.makedirs(full_path) relpath = os.path.join(localpath, filename) - if url in locations[relpath]: + if relpath in locations and url in locations[relpath]: continue print('downloading {}'.format(filename))