Skip to content

Commit c60c774

Browse files
authored
Merge pull request #4222 from AllskyTeam/4220-openweather-issue
#4220 - Fix for non string lats and lons
2 parents a26f865 + fc0114a commit c60c774

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/modules/allsky_shared.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def convertLatLonOld(input):
8484
def convertLatLon(input):
8585
""" lat and lon can either be a positive or negative float, or end with N, S, E,or W. """
8686
""" If in N, S, E, W format, 0.2E becomes -0.2 """
87-
input = input.upper()
87+
88+
""" #4220 Ensure that the passed in value is always a string"""
89+
input = str(input).upper()
8890
nsew = 1 if input[-1] in ['N', 'S', 'E', 'W'] else 0
8991
if nsew:
9092
multiplier = 1 if input[-1] in ['N', 'E'] else -1

0 commit comments

Comments
 (0)