in notifier.py [0:0]
def __init__(self, cfg_file: str):
self.config = yaml.safe_load(open(cfg_file))
self.templates = {}
self.diffcomments: typing.Dict[str, DiffComments] = {}
for key, tmpl_file in self.config["templates"].items():
if os.path.exists(tmpl_file):
print("Loading template " + tmpl_file)
subject, contents = open(tmpl_file).read().split("\n", 1)
subject = subject.replace("subject: ", "")
contents = contents.strip()
self.templates[key] = (
subject,
contents,
)