aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'config.py')
-rw-r--r--config.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/config.py b/config.py
new file mode 100644
index 0000000..d50d4d7
--- /dev/null
+++ b/config.py
@@ -0,0 +1,15 @@
+import ConfigParser
+
+filename = None
+
+class AliasConfigParser(ConfigParser.RawConfigParser):
+
+ def read(self, filenames):
+ ConfigParser.RawConfigParser.read(self, filenames)
+ 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")
+
+config = AliasConfigParser()