config.py 文件源码

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

项目:sawtooth-core 作者: hyperledger 项目源码 文件源码
def _get_processor_config(filename=None):
    """Determines if there is a proccesor config in the config directory
       and returns it. If it does not exist, return None.

    Arguments:
        filename (str): The name of the processor config specific to the
            transaction processor that is being started.

    Returns:
        processor_config (dict): The dictionary to set transaction processor
    """

    if filename is not None:

        conf_file = os.path.join(get_config_dir(), filename)
        if os.path.exists(conf_file):
            with open(conf_file) as fd:
                raw_config = fd.read()
                log_config = toml.loads(raw_config)
                return log_config
    return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号