From da27247b21dbad8efe4447b703efd7305b9e03b4 Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Mon, 13 Jul 2020 08:53:19 -0700 Subject: [PATCH] Fix the None Type Exception when Interface Table does not exist (cold boot) as part of db migration (#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 --- scripts/db_migrator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index c6c5f90945..17ec3ea6e6 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -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":