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
评论列表
文章目录