Skip to content

Commit

Permalink
use typer print instead of normal print!
Browse files Browse the repository at this point in the history
rndmh3ro committed Nov 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7d0b1eb commit bb1c6f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aar_doc/cli.py
Original file line number Diff line number Diff line change
@@ -130,13 +130,17 @@ def write(ctx: typer.Context, content: str) -> None:
try:
begin = lines.index("<!-- BEGIN_ANSIBLE_DOCS -->\n")
except ValueError:
print("Could not find <!-- BEGIN_ANSIBLE_DOCS --> in the output file")
typer.echo(
"Could not find <!-- BEGIN_ANSIBLE_DOCS --> in the output file"
)
raise typer.Exit(code=1)

try:
end = lines.index("<!-- END_ANSIBLE_DOCS -->\n")
except ValueError:
print("Could not find <!-- END_ANSIBLE_DOCS --> in the output file")
typer.echo(
"Could not find <!-- END_ANSIBLE_DOCS --> in the output file"
)
raise typer.Exit(code=1)

header = [*lines[:begin]]

0 comments on commit bb1c6f4

Please sign in to comment.