split config and property code, first test

This commit is contained in:
Jakob Ketterl
2020-03-21 22:40:39 +01:00
parent 7948b7bfa1
commit 541c38151f
24 changed files with 210 additions and 193 deletions

View File

@ -1,5 +1,5 @@
from . import Controller
from owrx.config import PropertyManager
from owrx.config import Config
from datetime import datetime
import mimetypes
import os
@ -47,7 +47,7 @@ class OwrxAssetsController(AssetsController):
class AprsSymbolsController(AssetsController):
def __init__(self, handler, request, options):
pm = PropertyManager.getSharedInstance()
pm = Config.get()
path = pm["aprs_symbols_path"]
if not path.endswith("/"):
path += "/"

View File

@ -2,14 +2,14 @@ from . import Controller
from owrx.client import ClientRegistry
from owrx.version import openwebrx_version
from owrx.sdr import SdrService
from owrx.config import PropertyManager
from owrx.config import Config
import os
import json
class StatusController(Controller):
def indexAction(self):
pm = PropertyManager.getSharedInstance()
pm = Config.get()
# TODO keys that have been left out since they are no longer simple strings: sdr_hw, bands, antenna
vars = {
"status": "active",
@ -42,7 +42,7 @@ class StatusController(Controller):
return stats
def jsonAction(self):
pm = PropertyManager.getSharedInstance()
pm = Config.get()
gps = pm["receiver_gps"]
status = {