Browse Source

Remove try/except in img metadata read

catboxanon 2 năm trước cách đây
mục cha
commit
60062b51d8
1 tập tin đã thay đổi với 1 bổ sung4 xóa
  1. 1 4
      modules/images.py

+ 1 - 4
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: