mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 00:12:41 +00:00
Fixing tests
This commit is contained in:
parent
288f40fd64
commit
5718903f74
@ -16,6 +16,9 @@ for md_file_path in sys.argv[1:]:
|
||||
img_url = img.attrib['src']
|
||||
if img_url.startswith('http'):
|
||||
continue
|
||||
img_url = 'content/' + img_url
|
||||
if os.path.exists(img_url):
|
||||
continue
|
||||
os.makedirs(os.path.dirname(img_url), exist_ok=True)
|
||||
ext = img_url.split('.')[-1].lower()
|
||||
with open(img_url, 'wb') as img_file:
|
||||
|
Loading…
Reference in New Issue
Block a user