Simple code cleanups.

This commit is contained in:
Miguel Astor
2025-01-15 15:14:40 -04:00
parent bcefd5fdd1
commit 964fee5ddf
4 changed files with 11 additions and 13 deletions

View File

@@ -17,6 +17,7 @@ THUMB_SIZE = (128, 128)
# Helper functions. #
###########################################################################################
def make_thumbnail(image):
"""
Creates a thumbnail in the corresponding THUMBNAILS_ROOT directory for the given image.
@@ -34,5 +35,5 @@ def make_thumbnail(image):
with Image.open(str(image)) as pilimg:
pilimg.thumbnail(THUMB_SIZE)
pilimg.save(str(thumb_path))
except:
except Exception:
pass