Skip to content

Commit

Permalink
Add empty case (sonic-net#279)
Browse files Browse the repository at this point in the history
* Add empty case

* Update teamshow

* Update teamshow
  • Loading branch information
tientienle authored and lguohan committed Jul 7, 2018
1 parent 9c4c362 commit 99c997e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/teamshow
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Teamshow(object):
Get the portchannel names from database.
"""
team_keys = self.db.keys(self.db.CONFIG_DB, PORT_CHANNEL_CFG_TABLE_PREFIX+"*")
if team_keys == None:
return
self.teams = [key[len(PORT_CHANNEL_CFG_TABLE_PREFIX):] for key in team_keys]

def get_portchannel_status(self, port_channel_name):
Expand Down

0 comments on commit 99c997e

Please sign in to comment.