Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
monoidic committed Nov 1, 2023
1 parent 9ccf164 commit 4d555b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions intelmq/bots/experts/jinja/expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ def init(self):

for field, template in self.fields.items():
if not template.startswith("file:///"):
raise ValueError(f"Jinja Template {templatefile} does not exist or is not readable.")
continue

templatefile = pathlib.Path(template[7:])
if templatefile.exists() and os.access(templatefile, os.R_OK):
self._templates[field] = templatefile.read_text()
if not (templatefile.exists() and os.access(templatefile, os.R_OK)):
raise ValueError(f"Jinja Template {templatefile} does not exist or is not readable.")
self._templates[field] = templatefile.read_text()

for field, template in self._templates.items():
try:
Expand Down

0 comments on commit 4d555b5

Please sign in to comment.