From 45ca2d5d1caf377fa44ceee258ecc26e03e6c62a Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Tue, 23 Jan 2018 10:56:27 +1100 Subject: [PATCH] Allow spaces in file paths --- scripts/photo_to_kml.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/photo_to_kml.py b/scripts/photo_to_kml.py index b8278d2..dae420f 100644 --- a/scripts/photo_to_kml.py +++ b/scripts/photo_to_kml.py @@ -74,8 +74,8 @@ def get_lat_lon(exif_data): gps_longitude = gps_info.get('GPSLongitude') gps_longitude_ref = gps_info.get('GPSLongitudeRef') - if (gps_latitude and gps_latitude_ref and gps_longitude - and gps_longitude_ref): + if (gps_latitude and gps_latitude_ref and gps_longitude and + gps_longitude_ref): lat = convert_to_degrees(gps_latitude) if gps_latitude_ref == 'S': lat = -lat @@ -103,8 +103,9 @@ def export_kml_file(dirname, fnames, kml_name): pnt.coords = [(lon, lat)] # Add content to popup window - pnt.description = (']]>'.format( - os.path.join(dirname, fname))) + pnt.description = ( + ']]>'.format( + os.path.join(dirname, fname))) pnt.stylemap.normalstyle.iconstyle.scale = 1 pnt.stylemap.normalstyle.iconstyle.icon.href = ( 'http://maps.google.com/'