From 60062b51d821411e8830f321a39ee473431c4535 Mon Sep 17 00:00:00 2001 From: catboxanon <122327233+catboxanon@users.noreply.github.com> Date: Thu, 25 May 2023 08:33:40 -0400 Subject: [PATCH] Remove try/except in img metadata read --- modules/images.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/images.py b/modules/images.py index d1801355..93252f41 100644 --- a/modules/images.py +++ b/modules/images.py @@ -668,10 +668,7 @@ def read_info_from_image(image): for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif', 'loop', 'background', 'timestamp', 'duration', 'progressive', 'progression', 'icc_profile', 'chromaticity']: - try: - items.pop(field, None) - except KeyError: - pass + items.pop(field, None) if items.get("Software", None) == "NovelAI": try: