Skip to content

Commit

Permalink
use typer print instead of normal print!
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro committed Nov 2, 2023
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
Expand Up @@ -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]]
Expand Down

0 comments on commit bb1c6f4

Please sign in to comment.