avoid Transpose to crash when exif data doesn't exists

This commit is contained in:
Timothée Peignier 2011-11-28 16:00:34 +01:00
parent ee1fb7f943
commit 54d5237adc

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