Fix some bugs #118

This commit is contained in:
Ian Renton
2026-08-01 09:32:16 +01:00
parent 01dc52f9bf
commit b7d2cf0fdb
2 changed files with 10 additions and 14 deletions
+1 -1
View File
@@ -621,7 +621,7 @@ class LookupHelper:
def _get_dxcc_data_for_callsign(self, call) -> dict | None: def _get_dxcc_data_for_callsign(self, call) -> dict | None:
"""Utility method to get generic DXCC data from our lookup table, if we can find it""" """Utility method to get generic DXCC data from our lookup table, if we can find it"""
for entry in self._dxcc_data.values(): for entry in [DATA_STORE.dxcc_data[key] for key in DATA_STORE.dxcc_data]:
if entry["_prefixRegexCompiled"].match(call): if entry["_prefixRegexCompiled"].match(call):
return entry return entry
return None return None
+1 -5
View File
@@ -56,7 +56,7 @@ def populate_sig_ref_info(sig_ref):
### SKIPS ### ### SKIPS ###
# #
# If the SIG is HEMA, we have no current lookup for this so just skip the lookup here. # If the SIG is HEMA, we have no current lookup for this so just skip the lookup here.
if sig.upper() == "HEMA" or sig.upper() == "KRMNPA": if sig.upper() == "HEMA":
return sig_ref return sig_ref
### PROGRAMMATIC DATA GENERATION INSTEAD OF LOOKUPS ### ### PROGRAMMATIC DATA GENERATION INSTEAD OF LOOKUPS ###
@@ -95,7 +95,6 @@ def populate_sig_ref_info(sig_ref):
# #
# OK, this is something we have to look up. Now check to see if our data store contains SIG ref information for # OK, this is something we have to look up. Now check to see if our data store contains SIG ref information for
# this SIG. If so, check for the reference data and use that. # this SIG. If so, check for the reference data and use that.
elif sig in DATA_STORE.sigrefs:
key = sig + ":" + ref_id key = sig + ":" + ref_id
lookup_data = DATA_STORE.sigrefs.get(key) if key in DATA_STORE.sigrefs else None lookup_data = DATA_STORE.sigrefs.get(key) if key in DATA_STORE.sigrefs else None
if lookup_data: if lookup_data:
@@ -106,9 +105,6 @@ def populate_sig_ref_info(sig_ref):
else: else:
logging.warning("%s database did not contain data for ref %s", sig, ref_id) logging.warning("%s database did not contain data for ref %s", sig, ref_id)
else:
logging.warning(f"Tried to look up a SIG called %s but Spothole does not know what that is.", sig)
except Exception: except Exception:
logging.error("Exception when looking up sig_ref info for " + sig + " ref " + ref_id, exc_info=True) logging.error("Exception when looking up sig_ref info for " + sig + " ref " + ref_id, exc_info=True)
return sig_ref return sig_ref