Skip to content

Commit

Permalink
QA
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-torres-marroquin committed Jul 18, 2024
1 parent 65a5741 commit a154ff5
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,13 @@ def validate_private_key_and_password(cls, values: dict) -> dict:
)

if not any([values.get("password"), private_key]):
raise ValueError(
"Must provide either a password or a private key."
)
raise ValueError("Must provide either a password or a private key.")

if private_key:
try:
values["private_key"] = format_private_key(private_key)
except IndexError as e:
raise ValueError(
f"Invalid private key format"
)
except IndexError:
raise ValueError("Invalid private key format")

return values

Expand Down

0 comments on commit a154ff5

Please sign in to comment.