From a7458e3e20dd559f4f5f74421702e64864a1e604 Mon Sep 17 00:00:00 2001 From: Nick Hilton Date: Sat, 19 May 2018 13:36:07 -0700 Subject: [PATCH] fixing issue #2 --- rank_photos.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rank_photos.py b/rank_photos.py index 03fe145..b37bb31 100755 --- a/rank_photos.py +++ b/rank_photos.py @@ -128,7 +128,12 @@ class Photo: with open(f, 'rb') as fd: tags = exifread.process_file(fd) - r = str(tags['Image Orientation']) + r = 'Horizontal (normal)' + + try: + r = str(tags['Image Orientation']) + except: + pass # rotate as necessary