Commit ec14ca26 authored by fred's avatar fred
Browse files

do not fail on missing image path

parent bcf60cd0
from datetime import datetime, timedelta
import os
from PIL import Image
def maybe_resize(image_path):
if not os.path.exists(image_path):
return
image = Image.open(image_path)
if max(image.size) > 1000:
# no sense storing images that large
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment