From d420f1fddf458965ca1f0ee7e2e990348acc8846 Mon Sep 17 00:00:00 2001 From: rjthomson <27867297+rjthomson@users.noreply.github.com> Date: Thu, 26 Jan 2023 17:05:00 -0800 Subject: [PATCH] Work around unpopulated hwsku in db_migrator.py Handle the case where hwsku is None. See sonic-net/sonic-buildimage#12083 and sonic-net/sonic-buildimage#11416 --- scripts/db_migrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index 6c8ef21b6f..02673e625e 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -890,7 +890,7 @@ def common_migration_ops(self): # removed together with calling to migrate_copp_table function. if self.asic_type != "mellanox": self.migrate_copp_table() - if self.asic_type == "broadcom" and 'Force10-S6100' in self.hwsku: + if self.asic_type == "broadcom" and self.hwsku and 'Force10-S6100' in self.hwsku: self.migrate_mgmt_ports_on_s6100() else: log.log_notice("Asic Type: {}, Hwsku: {}".format(self.asic_type, self.hwsku))