OAuth2Util/OAuth2Util.py
def _get_value(self, key, func=None, split_val=None, as_boolean=False,
		exception_default=None):
		"""
		Helper method to get a value from the config
		"""
		try:
			if as_boolean:
				return self.config.getboolean(key[0], key[1])
			value = self.config.get(key[0], key[1])
			if split_val is not None:
				value = value.split(split_val)
			if func is not None:
				return func(value)
			return value
		except (KeyError, configparser.NoSectionError, configparser.NoOptionError) as e:
			if exception_default is not None:
				return exception_default
			raise KeyError(e)
def _get_value(self, key, func=None, split_val=None, as_boolean=False,
		exception_default=None):
		"""
		Helper method to get a value from the config
		"""
		try:
			if as_boolean:
				return self.config.getboolean(key[0], key[1])
			value = self.config.get(key[0], key[1])
			if split_val is not None:
				value = value.split(split_val)
			if func is not None:
				return func(value)
			return value
		except (KeyError, configparser.NoSectionError, configparser.NoOptionError) as e:
			if exception_default is not None:
				return exception_default
			raise KeyError(e)
Helper method to get a value from the config