aboutsummaryrefslogtreecommitdiffstats
path: root/server/config.py
blob: ab9be5276d7a058d6326bcb081494937d50c9bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import ConfigParser

class AliasConfigParser(ConfigParser.RawConfigParser):

    def read(self, filename):
        ConfigParser.RawConfigParser.read(self, filename)
        self.name = self.get("component", "name")
        self.root = self.get("component", "root")
        self.host = self.get("component", "host")
        self.secret = self.get("component", "secret")
        self.port = self.getint("component", "port")
        self.background = self.getboolean("component", "background")
        self.logfile = self.get("component", "logfile")
        self.pidfile = self.get("component", "pidfile")

config = AliasConfigParser()