Skip to content

Commit

Permalink
Gracious message when vault is not reachable (#14942)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyejare authored May 10, 2024
1 parent acaf34a commit cdf898a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion robottelo/utils/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def exec_vault_command(self, command: str, **kwargs):
logger.error(f"Error! {self.HELP_TEXT}")
sys.exit(1)
if vcommand.stderr:
if 'Error revoking token' in verror:
if 'no such host' in verror:
logger.error("The Vault host is not reachable, check network availability.")
sys.exit()
elif 'Error revoking token' in verror:
logger.info("Token is alredy revoked!")
elif 'Error looking up token' in verror:
logger.info("Vault is not logged in!")
Expand Down

0 comments on commit cdf898a

Please sign in to comment.