Ignore FileExistsError in thumbnails
This commit is contained in:
parent
16b174d882
commit
849cdd257d
|
@ -26,8 +26,11 @@ ALLOWED_RESOLUTIONS=[(100,67), (270,180), (350,233)]
|
||||||
|
|
||||||
def mkdir(path):
|
def mkdir(path):
|
||||||
assert path != "" and path is not None
|
assert path != "" and path is not None
|
||||||
|
try:
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
except FileExistsError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def resize_and_crop(img_path, modified_path, size):
|
def resize_and_crop(img_path, modified_path, size):
|
||||||
|
|
Loading…
Reference in New Issue