Fix case sensitivity in file extension check

master
Dan Howe 7 years ago
parent 783590745e
commit ed9ccc463e

@ -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
@ -125,7 +125,10 @@ def main():
# Get files in image directory
ext = ['.jpg', '.jpeg', '.tif', '.tiff']
dirname = args.folder
fnames = [f for f in os.listdir(dirname) if os.path.splitext(f)[-1] in ext]
fnames = [
f for f in os.listdir(dirname)
if os.path.splitext(f)[-1].lower() in ext
]
# Create kml file
kml_name = dirname + '.kml'

Loading…
Cancel
Save