Skip to content

Commit

Permalink
Merge pull request #315 from phenobarbital/dev
Browse files Browse the repository at this point in the history
avoid errors on Template
  • Loading branch information
phenobarbital authored Nov 12, 2024
2 parents 7ca02d0 + 4d5087b commit 98f5be3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion navigator/template/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ def configure(self):
# TODO: check the bug ,encoding='ANSI'
self.env = Environment(loader=self.loader, **self.config)
compiled_path = str(self.tmpl_dir.joinpath(".compiled"))
self.env.compile_templates(target=compiled_path, zip="deflated")
try:
self.env.compile_templates(
target=compiled_path,
zip="deflated",
ignore_errors=True
)
except UnicodeDecodeError:
pass
### adding custom filters:
if self.filters is not None:
self.env.filters.update(self.filters)
Expand Down
2 changes: 1 addition & 1 deletion navigator/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__description__ = (
"Navigator Web Framework based on aiohttp, " "with batteries included."
)
__version__ = "2.11.4"
__version__ = "2.11.5"
__author__ = "Jesus Lara"
__author_email__ = "[email protected]"
__license__ = "BSD"

0 comments on commit 98f5be3

Please sign in to comment.