Merge pull request #49 from cyberdelia/fix-empty-exif-data

Avoid Transpose to crash when there is no exif data.
This commit is contained in:
Bryan Veloso 2011-11-04 04:50:19 -07:00
commit 486fb51a1e

View file

@ -163,7 +163,7 @@ class Transpose(object):
try:
orientation = img._getexif()[0x0112]
ops = self._EXIF_ORIENTATION_STEPS[orientation]
except AttributeError:
except (TypeError, AttributeError):
ops = []
else:
ops = self.methods