Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Catch a potential OSError when getting EXIF info

_getexif is pretty touchy about errors happening. It was already wrapped
in a generous try/except which catches most issues. It looks like this
one is happening with the TIFF plugin (which is odd, since the image
does seem to be a JPEG - I guess PIL is just confused).

Oh well, just add another exception clause to the except;pass branch.

Fixes #151.
  • Loading branch information...
commit 671b83061eadd424a9e523c8534f04918edfd500 1 parent f5f431e
@SmileyChris authored
View
8 CHANGES.rst
@@ -4,6 +4,14 @@ Changes
dev
---
+* Catch an OSError exception when trying to get the EXIF data of a touchy
+ image.
+
+1.0.1
+-----
+
+* Fix a Django 1.2 backwards incompatibility in ``easy_thumbnails.conf``
+
* Introduced a ``thumbnail_created`` signal.
1.0
View
2  easy_thumbnails/__init__.py
@@ -1 +1 @@
-VERSION = '1.0.1'
+VERSION = '1.0.2'
View
2  easy_thumbnails/utils.py
@@ -115,7 +115,7 @@ def exif_orientation(im):
"""
try:
exif = im._getexif()
- except (AttributeError, IndexError, KeyError):
+ except (AttributeError, IndexError, KeyError, OSError):
exif = None
if exif:
orientation = exif.get(0x0112)
Please sign in to comment.
Something went wrong with that request. Please try again.