From a1e5d2c87d84db64eb94e48b964039ea9af1655c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 24 Feb 2022 22:58:34 +0200 Subject: [PATCH] Set empty dicts to avoid additional errors when config is invalid --- reactbot/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactbot/config.py b/reactbot/config.py index 8cb9ba5..efbf9ae 100644 --- a/reactbot/config.py +++ b/reactbot/config.py @@ -44,6 +44,9 @@ def do_update(self, helper: ConfigUpdateHelper) -> None: def parse_data(self) -> None: self.default_flags = re.RegexFlag(0) + self.templates = {} + self.rules = {} + self.default_flags = self._get_flags(self["default_flags"]) self.templates = {name: self._make_template(name, tpl) for name, tpl in self["templates"].items()}