From a61a2f6d9e03ef9ee99917cea7fe0a436b9d9556 Mon Sep 17 00:00:00 2001 From: Makito Date: Sun, 6 Oct 2019 07:02:50 +0800 Subject: [PATCH] In case the image's EXIF does not contain the "Orientation" key --- opendrop/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendrop/util.py b/opendrop/util.py index d08e031..6a2d866 100644 --- a/opendrop/util.py +++ b/opendrop/util.py @@ -180,7 +180,7 @@ class AirDropUtil: orientation = exif['Orientation'] if orientation in angles.keys(): im = im.rotate(angles[orientation], expand=True) - except AttributeError: + except (AttributeError, KeyError): pass # no EXIF data available # Big image