Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mtache committed Aug 8, 2023
1 parent b0c845c commit b8d880c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions anta/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ def anta(
if ctx.params.get("enable"):
if ctx.params.get("enable_password") is None:
if click.confirm("Is a password required to enter EOS privileged EXEC mode?"):
ctx.params["enable_password"] = click.prompt("Please enter a password to enter EOS privileged EXEC mode", type=str, hide_input=True, confirmation_prompt=True)
ctx.params["enable_password"] = click.prompt(
"Please enter a password to enter EOS privileged EXEC mode", type=str, hide_input=True, confirmation_prompt=True
)
if ctx.params.get("password") is None:
raise click.BadParameter(
f"EOS password needs to be provided by using either the '{anta.params[2].opts[0]}' option or the '{anta.params[5].opts[0]}' option."
)
if not ctx.params.get("enable") and ctx.params.get("enable_password"):
raise click.BadParameter(f"Providing a password to access EOS Privileged EXEC mode requires '{anta.params[4].opts[0]}' option.")



# if not ctx.obj.get("_anta_help"):
# # Ensure password is provided
# if ctx.params.get("password") is None:
Expand Down

0 comments on commit b8d880c

Please sign in to comment.