_getexif can fail in a large number of ways and throw a variety
of exceptions. Gracefully handle all exceptions when calling it.
I ran into this issue when importing a large number of images in Wagtail causing a variety of exceptions being thrown due to slightly malformed images that otherwise displayed and scaled fine. It seems like Pillow's EXIF support still hasn't been worked on to more gracefully handle these issues, so I'd say this is the way to go.
_getexif can fail in a large number of ways and throw a variety of exceptions. Gracefully handle all exceptions when calling it.
I ran into this issue when importing a large number of images in Wagtail causing a variety of exceptions being thrown due to slightly malformed images that otherwise displayed and scaled fine. It seems like Pillow's EXIF support still hasn't been worked on to more gracefully handle these issues, so I'd say this is the way to go.
Looking around a little, seems like easy-thumbnails had the same issue: https://github.com/SmileyChris/easy-thumbnails/commit/a67f18e3d1dfd09cd73f77d1ac8aa9c29a00711f