Skip to content

Commit

Permalink
CTX-6562: Only string that represents the status should be of differe…
Browse files Browse the repository at this point in the history
…nt color.
  • Loading branch information
Bogdan Tintor committed Aug 20, 2024
1 parent a0ca69d commit d2439d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions coretex/cli/commands/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ def config(advanced: bool) -> None:
def status() -> None:
nodeStatus = getNodeStatus()
statusColors = {
'inactive': ui.errorEcho,
'active': ui.successEcho,
'busy': ui.stdEcho,
'reconnecting': ui.progressEcho
'inactive': 'red',
'active': 'green',
'busy': 'cyan',
'reconnecting': 'yellow'
}

echo = statusColors.get(nodeStatus.name, ui.stdEcho)
echo(f"Current status of Node is {nodeStatus.name}.")
statusEcho = click.style(nodeStatus.name, fg = statusColors[nodeStatus.name])
ui.stdEcho(f"Current status of node is {statusEcho}.")


@click.group()
Expand Down

0 comments on commit d2439d0

Please sign in to comment.