From 0c3cfa8e47a035b1976e4807eae990217ac5d434 Mon Sep 17 00:00:00 2001 From: zserg Date: Sun, 27 Dec 2015 12:23:18 +0300 Subject: [PATCH] @jmathai suggestion to improve the code readability --- elodie/media/photo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elodie/media/photo.py b/elodie/media/photo.py index 8217905..d9e3c5c 100644 --- a/elodie/media/photo.py +++ b/elodie/media/photo.py @@ -72,10 +72,10 @@ class Photo(Media): try: # this is a hack to get the proper direction by negating the values for S and W latdir = 1 - if(key == self.exif_map['latitude'] and str(exif[self.exif_map['latitude_ref']].value) == 'S'): + if(type == 'latitude' and str(exif[self.exif_map['latitude_ref']].value) == 'S'): latdir = -1 londir = 1 - if(key == self.exif_map['longitude'] and str(exif[self.exif_map['longitude_ref']].value) == 'W'): + if(type =='longitude' and str(exif[self.exif_map['longitude_ref']].value) == 'W'): londir = -1 coords = exif[key].value