mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Extract config into yaml
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user