Merge pull request #73 from cyberdelia/fix-transpose-exif

Catch error when exif data doesn't exist
This commit is contained in:
Matthew Tretter 2011-12-07 21:37:48 -08:00
commit e574f1190f

View file

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