aboutsummaryrefslogtreecommitdiff
path: root/voctogui/lib/config.py
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-09-02 15:19:30 +0200
committerMaZderMind <git@mazdermind.de>2015-09-02 15:19:30 +0200
commit20d75f6c7f5cad2f5c1b4da71ad5405848230201 (patch)
tree93894d7bc79a0b018275efbc0db524ac6f686570 /voctogui/lib/config.py
parenta004948051e182edb3a7e40f1f7f2e14bebb0e0e (diff)
parent8646386d09ab6cdabf0b8421cece5c1ddd69633f (diff)
Merge branch 'control-server-resilience'
Based on the work made by zuntrax & mithro at cccamp15
Diffstat (limited to 'voctogui/lib/config.py')
-rw-r--r--voctogui/lib/config.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/voctogui/lib/config.py b/voctogui/lib/config.py
index b06075c..b18acfb 100644
--- a/voctogui/lib/config.py
+++ b/voctogui/lib/config.py
@@ -1,14 +1,22 @@
#!/usr/bin/python3
+import logging
import os.path
from configparser import SafeConfigParser
from lib.args import Args
+import lib.connection as Connection
__all__ = ['Config']
def getlist(self, section, option):
return [x.strip() for x in self.get(section, option).split(',')]
+def fetchRemoteConfig(self):
+ log = logging.getLogger('Config')
+ log.info("reading server-config %s", Connection)
+ Connection.ask('config')
+
SafeConfigParser.getlist = getlist
+SafeConfigParser.fetchRemoteConfig = fetchRemoteConfig
files = [
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../default-config.ini'),