summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'config.py')
-rw-r--r--config.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/config.py b/config.py
index 3f8995b..cadeb14 100644
--- a/config.py
+++ b/config.py
@@ -19,7 +19,13 @@ class Config(object):
else:
raise
- def getint(self, key, section = config_section):
- return self.config.getint(section, key)
+ def getint(self, key, section = config_section, default = None):
+ try:
+ return self.config.getint(section, key)
+ except NoOptionError:
+ if default != None:
+ return default
+ else:
+ raise
config = Config()