diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-01-18 12:27:37 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-01-18 12:27:37 -0500 |
| commit | f70165ef6229a92bf8cfa6f16eff980a4a7491fe (patch) | |
| tree | e2954759f71c0b4c482334ba9b278a4224e97197 /alias_server/config.py | |
| parent | 0ce9f4fb84693f34113630c59610b47a082ae71a (diff) | |
| download | alias-f70165ef6229a92bf8cfa6f16eff980a4a7491fe.tar.gz | |
Added setup.py and big reorg of the source tree
this should fix tickets #10 and #11
Diffstat (limited to 'alias_server/config.py')
| -rw-r--r-- | alias_server/config.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/alias_server/config.py b/alias_server/config.py new file mode 100644 index 0000000..74befe2 --- /dev/null +++ b/alias_server/config.py @@ -0,0 +1,18 @@ +import ConfigParser + +class AliasConfigParser(ConfigParser.SafeConfigParser): + + def read(self, filename): + ConfigParser.SafeConfigParser.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") + if self.has_option("component", "logfile"): + self.logfile = self.get("component", "logfile") + if self.has_option("component", "pidfile"): + self.pidfile = self.get("component", "pidfile") + +config = AliasConfigParser() |
