Ignore FileExistsError in thumbnails

This commit is contained in:
rubenwardy 2020-07-10 20:50:25 +01:00
parent 16b174d882
commit 849cdd257d
1 changed files with 5 additions and 2 deletions

View File

@ -26,8 +26,11 @@ ALLOWED_RESOLUTIONS=[(100,67), (270,180), (350,233)]
def mkdir(path):
assert path != "" and path is not None
if not os.path.isdir(path):
os.mkdir(path)
try:
if not os.path.isdir(path):
os.mkdir(path)
except FileExistsError:
pass
def resize_and_crop(img_path, modified_path, size):