Skip to content

Commit

Permalink
Fix the None Type Exception when Interface Table does not exist (col…
Browse files Browse the repository at this point in the history
…d boot) as part of db migration (sonic-net#986)

* Fix for command. show interface transceiver eeprom -d Ethernet
Make sure key is present in dom_info_dict and then only parse
else skip.

* Fix the None Type Exception when Interface Table does not exist (cold boot) as part of db migration
  • Loading branch information
abdosi authored Jul 13, 2020
1 parent b4b5fd3 commit da27247
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ def migrate_intf_table(self):
if self.appDB is None:
return

if_db = []
data = self.appDB.keys(self.appDB.APPL_DB, "INTF_TABLE:*")

if data is None:
return

if_db = []
for key in data:
if_name = key.split(":")[1]
if if_name == "lo":
Expand Down

0 comments on commit da27247

Please sign in to comment.