config.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:scitokens 作者: scitokens 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号