diff options
Diffstat (limited to 'config.py')
| -rw-r--r-- | config.py | 10 | 
1 files changed, 8 insertions, 2 deletions
@@ -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()  | 
