Skip to content

Commit

Permalink
Fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesloibl committed Jan 11, 2024
1 parent 9d048f9 commit 982b2dd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/pharaoh/templating/second_level/template_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import TYPE_CHECKING, Callable

import jinja2
import jinja2.utils
import omegaconf
from jinja2_git import GitExtension

Expand Down Expand Up @@ -50,13 +51,10 @@ def get_source(self, environment: jinja2.Environment, template: str) -> tuple[st

# Original code starts from here

f = jinja2.loaders.open_if_exists(filename)
if f is None:
if not os.path.isfile(filename):
continue
try:
with open(filename, "rb") as f:
contents = f.read().decode(self.encoding)
finally:
f.close()

def up_to_date() -> bool:
return False
Expand Down

0 comments on commit 982b2dd

Please sign in to comment.