summaryrefslogtreecommitdiffstats
path: root/git-interface/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'git-interface/config.py')
-rw-r--r--git-interface/config.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/git-interface/config.py b/git-interface/config.py
new file mode 100644
index 0000000..cd6495b
--- /dev/null
+++ b/git-interface/config.py
@@ -0,0 +1,27 @@
+import configparser
+import os
+
+_parser = None
+
+
+def _get_parser():
+ global _parser
+
+ if not _parser:
+ _parser = configparser.RawConfigParser()
+ path = os.path.dirname(os.path.realpath(__file__)) + "/../conf/config"
+ _parser.read(path)
+
+ return _parser
+
+
+def get(section, option):
+ return _get_parser().get(section, option)
+
+
+def getboolean(section, option):
+ return _get_parser().getboolean(section, option)
+
+
+def getint(section, option):
+ return _get_parser().getint(section, option)