Fix a bug where some WWFF references had "-" for lat/lon/grid and Spothole did not deal with them well.

This commit is contained in:
Ian Renton
2026-01-18 07:40:51 +00:00
parent 4d344021c7
commit 522f90af97
3 changed files with 28 additions and 13 deletions

View File

@@ -416,7 +416,12 @@ class LookupHelper:
# Infer a grid locator from a callsign (using DXCC, probably very inaccurate)
def infer_grid_from_callsign_dxcc(self, call):
latlon = self.infer_latlon_from_callsign_dxcc(call)
return latlong_to_locator(latlon[0], latlon[1], 8)
grid = None
try:
grid = latlong_to_locator(latlon[0], latlon[1], 8)
except:
logging.debug("Invalid lat/lon received for DXCC")
return grid
# Infer a mode from the frequency (in Hz) according to the band plan. Just a guess really.
def infer_mode_from_frequency(self, freq):