From 3072dcabb7f8d35f21ebfaeae53a1218ecd9d43e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 16 Dec 2012 11:53:03 +0100 Subject: Added album view. --- config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'config.py') 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() -- cgit v1.2.3