allan %!s(int64=9) %!d(string=hai) anos
pai
achega
dcddfd0e3b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      photos/photos.py

+ 4 - 1
photos/photos.py

@@ -67,9 +67,12 @@ def resize_photos(generator, writer):
             im = Image.open(orig)
             try:
                 exif = im._getexif()
-                icc_profile = im.info.get("icc_profile")
             except Exception:
                 exif = None
+            try:
+                icc_profile = im.info.get("icc_profile")
+            except Exception:
+                icc_profile = None
             if exif:
                 for tag, value in exif.items():
                     decoded = ExifTags.TAGS.get(tag, tag)