Set empty dicts to avoid additional errors when config is invalid

This commit is contained in:
Tulir Asokan 2022-02-24 22:58:34 +02:00
parent e22fc9e3c1
commit a1e5d2c87d

View file

@ -44,6 +44,9 @@ class Config(BaseProxyConfig):
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()}