Update pelican_import.py

Don't create empty sets in download_attachments, this might fix an issue that came in the tests.
This commit is contained in:
Stuart Axon 2017-10-14 19:46:16 +01:00 committed by GitHub
commit 2ece08afaf

View file

@ -673,7 +673,7 @@ def download_attachments(output_path, urls):
if not os.path.exists(full_path): if not os.path.exists(full_path):
os.makedirs(full_path) os.makedirs(full_path)
relpath = os.path.join(localpath, filename) relpath = os.path.join(localpath, filename)
if url in locations[relpath]: if relpath in locations and url in locations[relpath]:
continue continue
print('downloading {}'.format(filename)) print('downloading {}'.format(filename))