Extract config into yaml

This commit is contained in:
Ian Renton
2025-09-27 14:54:14 +01:00
parent 6d735cfc67
commit 00c56a7c10
9 changed files with 48 additions and 14 deletions

View File

@@ -7,10 +7,11 @@ from time import sleep
import pytz
import telnetlib3
from core.constants import SERVER_OWNER_CALLSIGN
from data.spot import Spot
from core.config import config
from providers.provider import Provider
# Provider for a DX Cluster. Hostname and port provided as parameters.
class DXCluster(Provider):
CALLSIGN_PATTERN = "([a-z|0-9|/]+)"
@@ -49,7 +50,7 @@ class DXCluster(Provider):
logging.info("DX Cluster " + self.hostname + " connecting...")
self.telnet = telnetlib3.Telnet(self.hostname, self.port)
self.telnet.read_until("login: ".encode("utf-8"))
self.telnet.write((SERVER_OWNER_CALLSIGN + "\n").encode("utf-8"))
self.telnet.write((config["server-owner-callsign"] + "\n").encode("utf-8"))
connected = True
logging.info("DX Cluster " + self.hostname + " connected.")
except Exception as e: