mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
17 lines
496 B
Python
17 lines
496 B
Python
import logging
|
|
import os
|
|
|
|
import yaml
|
|
|
|
# Check you have a config file
|
|
if not os.path.isfile("config.yml"):
|
|
logging.error("Your config file is missing. Ensure you have copied config-example.yml to config.yml and updated it according to your needs.")
|
|
exit()
|
|
|
|
# Load config
|
|
config = yaml.safe_load(open("config.yml"))
|
|
logging.info("Loaded config.")
|
|
|
|
MAX_SPOT_AGE = config["max-spot-age-sec"]
|
|
SERVER_OWNER_CALLSIGN = config["server-owner-callsign"]
|
|
WEB_SERVER_PORT = config["web-server-port"] |