Fix bugs in GMA and WWBOTA providers

This commit is contained in:
Ian Renton
2026-08-15 13:59:52 +01:00
parent fe4826b729
commit ae1f752516
10 changed files with 23 additions and 23 deletions
+7 -7
View File
@@ -135,23 +135,23 @@ class GMA(HTTPSpotProvider):
spot.sig_refs[0].sig = ref_info["reftype"]
spot.sig = ref_info["reftype"]
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point;
# other code will do that for us.
new_spots.append(spot)
elif not ref_response.from_cache:
if not ref_response.ok:
logger.warning(
f"HTTP {ref_response.status_code} when looking up GMA ref {source_spot['REF']}"
)
else:
logger.warning(
f"GMA API returned a malformed response when looking up ref {source_spot['REF']}"
logger.debug(
f"GMA API had no data for {source_spot['REF']}, it may not be a valid reference."
)
except Exception:
logger.exception(
f"Exception when looking up {self.REF_INFO_URL_ROOT}{source_spot['REF']}, ignoring this spot for now"
f"Exception when looking up {self.REF_INFO_URL_ROOT}{source_spot['REF']}, SIG data will not be populated for the spot."
)
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point;
# other code will do that for us.
new_spots.append(spot)
else:
logger.warning(f"The GMA API returned an unexpected response (HTTP {http_response.status_code}).")
+1 -1
View File
@@ -34,7 +34,7 @@ class WWBOTA(SSESpotProvider):
dx_call=source_spot["call"].upper(),
de_call=source_spot["spotter"].upper(),
freq=float(source_spot["freq"]) * 1000000,
mode=source_spot["mode"].upper(),
mode=source_spot["mode"].upper() if "mode" in source_spot else None,
comment=source_spot["comment"],
sig="WWBOTA",
sig_refs=refs,