Skip to content

Commit 8cf1def

Browse files
committed
Fix review comments in show
Signed-off-by: Stephen Sun <[email protected]>
1 parent 6ec6538 commit 8cf1def

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

show/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,9 +2185,9 @@ def suppress_configuration(db, namespace):
21852185
','.join(suppressSeverities[severity].get('categories', ['none'])),
21862186
suppressSeverities[severity].get('max_events', 'unlimited')])
21872187

2188-
if supported:
21892188
click.echo(tabulate(body, header))
2190-
else:
2189+
2190+
if not supported:
21912191
ctx = click.get_current_context()
21922192
ctx.fail("ASIC/SDK health event is not supported on the platform")
21932193

@@ -2229,9 +2229,9 @@ def received(db, namespace):
22292229
event = state_db.get_all(state_db.STATE_DB, key)
22302230
body.append([key.split('|')[1], event.get('severity'), event.get('category'), event.get('description')])
22312231

2232-
if supported:
22332232
click.echo(tabulate(body, header))
2234-
else:
2233+
2234+
if not supported:
22352235
ctx = click.get_current_context()
22362236
ctx.fail("ASIC/SDK health event is not supported on the platform")
22372237

0 commit comments

Comments
 (0)