Skip to content

Commit

Permalink
handle undefined roles when giving status (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
pymonger authored May 24, 2022
1 parent ff7766e commit 456b4f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sdscli/adapters/hysds/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ def print_status(conf, comp, debug=False):
""""Status of component."""

print_component_header(comp)
print_tps_status(conf, comp, debug)
print_supervisor_header(comp)
execute(fab.status, roles=[comp])
if len(fab.env.roledefs[comp]) == 1 and "None" not in fab.env.roledefs[comp]:
print_tps_status(conf, comp, debug)
print_supervisor_header(comp)
execute(fab.status, roles=[comp])
else:
print(f"No configured host(s) for role: {comp}. Skipping.")


def status_comp(comp, conf, debug=False):
Expand Down

0 comments on commit 456b4f7

Please sign in to comment.