mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-28 12:52:32 +01:00
Ignore FileExistsError in thumbnails
This commit is contained in:
@ -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
|
||||||
if not os.path.isdir(path):
|
try:
|
||||||
os.mkdir(path)
|
if not os.path.isdir(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):
|
||||||
|
Reference in New Issue
Block a user