Fixing tests

This commit is contained in:
Lucas Cimon 2017-12-03 01:46:45 +01:00
parent 288f40fd64
commit 5718903f74
No known key found for this signature in database
GPG Key ID: 6AF36E0DE97FE852
1 changed files with 3 additions and 0 deletions

View File

@ -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: