Skip to content

Commit

Permalink
[fdbshow] fix fdbshow, show arp commands (sonic-net#95)
Browse files Browse the repository at this point in the history
[fdbshow] fix fdbshow, show arp commands
Fix an exception. port_util.get_vlan_id_from_bvid method use db.keys and try to find key in Unicode format but in db keys in nonUnicode format
  • Loading branch information
dmytroxshevchuk authored Nov 21, 2020
1 parent 1664be9 commit 6e42d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/swsssdk/port_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_vlan_id_from_bvid(db, bvid):
Get the Vlan Id from Bridge Vlan Object
"""
db.connect('ASIC_DB')
vlan_obj = db.keys('ASIC_DB', "ASIC_STATE:SAI_OBJECT_TYPE_VLAN:" + bvid)
vlan_obj = db.keys('ASIC_DB', str("ASIC_STATE:SAI_OBJECT_TYPE_VLAN:" + bvid))
vlan_entry = db.get_all('ASIC_DB', vlan_obj[0], blocking=True)
vlan_id = None
# TODO: remove the first branch after all SonicV2Connector are migrated to decode_responses
Expand Down

0 comments on commit 6e42d58

Please sign in to comment.