Skip to content

Commit

Permalink
[show] Allow system with no ports in config db run without errors (so…
Browse files Browse the repository at this point in the history
…nic-net#1754)

What I did
Allow system with no ports in config db run without errors.
This is needed for modular system which should boot properly without line cards.

How I did it
Do not raise warning if ports dictionary is empty.

How to verify it
Run show interfaces status
  • Loading branch information
liorghub authored Sep 1, 2021
1 parent 720b650 commit 7ed9a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities_common/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(self, db=None):


if not self.port_dict:
click.echo(message="Warning: failed to retrieve PORT table from ConfigDB!", err=True)
click.echo(message="Configuration database contains no ports")
self.port_dict = {}

for port_name in self.port_dict:
Expand Down

0 comments on commit 7ed9a91

Please sign in to comment.