Skip to content

Commit 1ebd099

Browse files
authored
Fix show fabric monitor capacity command when the feature is disabled. (sonic-net#3347)
1 parent 6829ded commit 1ebd099

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/fabricstat

+4-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,10 @@ Examples:
540540
stat = FabricCapacity(namespace, table_cnt, threshold)
541541
stat.capacity_print()
542542

543-
click.echo("Monitored fabric capacity threshold: {}".format(threshold[0]))
543+
print_th = ""
544+
if threshold:
545+
print_th = threshold[0]
546+
click.echo("Monitored fabric capacity threshold: {}".format(print_th))
544547
click.echo()
545548
click.echo(tabulate(table_cnt, capacity_header, tablefmt='simple', stralign='right'))
546549
else:

0 commit comments

Comments
 (0)