Skip to content

Commit

Permalink
Remove LoginFailedError message hard coding. (#277)
Browse files Browse the repository at this point in the history
* Remove hardcoded LoginFailed output.

Fixes #272
  • Loading branch information
terjekv authored Jul 1, 2024
1 parent cbeb35e commit 23c8f9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions mreg_cli/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,4 @@ def formatted_exception(self) -> str:
"""
return f"Login failed: {self.escape()}"

def __str__(self) -> str:
"""Return the error message."""
return "Login failed"

pass
2 changes: 1 addition & 1 deletion mreg_cli/utilities/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def prompt_for_password_and_login(user: str, url: str, catch_exception: bool = T
if catch_exception:
e.print_self()
else:
raise LoginFailedError() from e
raise LoginFailedError("Updating token failed.") from e


def logout() -> None:
Expand Down

0 comments on commit 23c8f9c

Please sign in to comment.