From 54d5237adc0be4eccb59c0d0c97ddfb9b908f8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timothe=CC=81e=20Peignier?= Date: Mon, 28 Nov 2011 16:00:34 +0100 Subject: [PATCH] avoid Transpose to crash when exif data doesn't exists --- imagekit/processors/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagekit/processors/__init__.py b/imagekit/processors/__init__.py index c7ff304..a8af194 100644 --- a/imagekit/processors/__init__.py +++ b/imagekit/processors/__init__.py @@ -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