Skip to content

Commit da27247

Browse files
authored
Fix the None Type Exception when Interface Table does not exist (cold 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
1 parent b4b5fd3 commit da27247

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/db_migrator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,12 @@ def migrate_intf_table(self):
115115
if self.appDB is None:
116116
return
117117

118-
if_db = []
119118
data = self.appDB.keys(self.appDB.APPL_DB, "INTF_TABLE:*")
119+
120+
if data is None:
121+
return
122+
123+
if_db = []
120124
for key in data:
121125
if_name = key.split(":")[1]
122126
if if_name == "lo":

0 commit comments

Comments
 (0)