Skip to content

Commit

Permalink
do not fail if output_template is too long
Browse files Browse the repository at this point in the history
when using output_template in config, it is checked if it is a path. however this fails if the template is too long to be considered a file path. an oserror is then thrown
  • Loading branch information
rndmh3ro committed Aug 8, 2023
1 parent 58fcbdb commit e40cee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aar_doc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def render_content(ctx: typer.Context, content_template: str) -> str:
loader=jinja2.FileSystemLoader([role_path, output_template_file.parent]),
)
template = env.get_template(output_template_file.name)
except FileNotFoundError:
except (FileNotFoundError, OSError):
env = jinja2.Environment(
keep_trailing_newline=True, loader=jinja2.FileSystemLoader(role_path)
)
Expand Down

0 comments on commit e40cee9

Please sign in to comment.