summaryrefslogtreecommitdiffstats
path: root/gui/muxconfig.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-03-15 11:04:25 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-03-15 11:04:25 +0100
commitabcb1a86381195ffb382297233158da2fa4aacc7 (patch)
tree5f429d5ca7fd1aace4335684d1b24ebb1f4a8590 /gui/muxconfig.py
parenta36150d2305e93de9d0f58cb48273ed9909cab05 (diff)
downloaddabmux-abcb1a86381195ffb382297233158da2fa4aacc7.tar.gz
dabmux-abcb1a86381195ffb382297233158da2fa4aacc7.tar.bz2
dabmux-abcb1a86381195ffb382297233158da2fa4aacc7.zip
Add tabbed interface to gui
Diffstat (limited to 'gui/muxconfig.py')
-rw-r--r--gui/muxconfig.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/gui/muxconfig.py b/gui/muxconfig.py
index efa4b93..64321a2 100644
--- a/gui/muxconfig.py
+++ b/gui/muxconfig.py
@@ -1,4 +1,5 @@
-#!/usr/bin/python
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
#
# Copyright (C) 2015
# Matthias P. Braendli, matthias.braendli@mpb.li
@@ -22,6 +23,22 @@
import socket
import json
+class General(object):
+ """Container object for general options"""
+ def __init__(self, pt):
+ ptree = pt['general']
+ for fieldname in ["nbframes",
+ "statsserverport",
+ "writescca",
+ "tist",
+ "dabmode",
+ "syslog"]:
+ if fieldname in ptree:
+ setattr(self, fieldname.replace("-", "_"), ptree[fieldname])
+ else:
+ setattr(self, fieldname.replace("-", "_"), "")
+ self.telnetport = pt['remotecontrol']['telnetport']
+
class Service(object):
"""Container object for a service"""
def __init__(self, name, ptree):
@@ -110,3 +127,6 @@ class ConfigurationHandler(object):
def get_components(self):
comp_pt = self._config['components']
return [Component(name, comp_pt[name]) for name in comp_pt]
+
+ def get_general_options(self):
+ return General(self._config)