From a0f2db4d295d46c84e4dc8249310c9facc2cf9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timothe=CC=81e=20Peignier?= Date: Fri, 4 Nov 2011 12:00:19 +0100 Subject: [PATCH] avoid Transpose to crash when there is no exif data --- 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 72e7f8d..d93b9a8 100644 --- a/imagekit/processors/__init__.py +++ b/imagekit/processors/__init__.py @@ -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