def get(key, default=None):
"""
Get the configuration value for key
:param str key: The key in the configuration to retreive
:returns: The value in the configuration, or the default
"""
del default
global configuration # pylint: disable=C0103
try:
return configuration.get("scitokens", key)
except configparser.NoOptionError as noe:
# Check the defaults
if key in CONFIG_DEFAULTS:
return CONFIG_DEFAULTS[key]
else:
raise noe
评论列表
文章目录