Bug fixes and minor doc clarifications

This commit is contained in:
Ian Renton
2026-08-20 07:30:21 +01:00
parent 85f63a1258
commit c5d6a65786
22 changed files with 44 additions and 52 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
from core.constants import CALL_ONLY_PATTERN
import re
from core.data_providers import DATA_PROVIDERS
from data.callsign import Callsign
@@ -11,7 +12,7 @@ def get_call_info(callsign, lookup_credentials):
callsign_data = Callsign(call=callsign)
# First check our input looks like a real callsign
if callsign and CALL_ONLY_PATTERN.match(callsign):
if callsign and re.match(r"^[A-Za-z0-9/\-]*$", callsign):
# Sort callsign providers by priority order, so we query the highest priority (lowest numbers) first, and only
# query other providers for data we are missing as we go along.
for p in sorted(DATA_PROVIDERS.callsign_data_providers, key=lambda p2: p2.priority):
-7
View File
@@ -1,5 +1,3 @@
import re
from core.config import SERVER_OWNER_CALLSIGN
from data.band import Band
from data.sig import SIG
@@ -11,11 +9,6 @@ SOFTWARE_VERSION = "2.0-pre"
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
HAMQTH_PRG = f"Spothole v{SOFTWARE_VERSION} operated by {SERVER_OWNER_CALLSIGN}".replace(" ", "_")
# Generally useful regexes
CALL_REGEX = r"[A-Za-z0-9/\-]+"
CALL_PATTERN = re.compile(CALL_REGEX)
CALL_ONLY_PATTERN = re.compile(rf"^{CALL_REGEX}$")
# Special Interest Groups
SIGS = [
SIG(