From c73a013d015ca576639fc238fbde1ea7dccc124c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 28 Feb 2018 15:20:12 -0800 Subject: mpm: periph_manager: Guarantee self.dboards exists Other components assume the existence of mgr.dboards, and so it needs to be default-initialized before doing any code that can go wrong. --- mpm/python/usrp_mpm/periph_manager/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mpm') diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index 1eb6dd8b0..9d9a293a2 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -136,6 +136,7 @@ class PeriphManagerBase(object): # Note: args is a dictionary. assert len(self.pids) > 0 assert self.mboard_eeprom_magic is not None + self.dboards = [] # Set up logging self.log = get_logger('PeriphManager') self.claimed = False @@ -288,7 +289,6 @@ class PeriphManagerBase(object): self.log.warning("--override-db-pids is going to skip dboards.") dboard_eeprom_paths = \ dboard_eeprom_paths[:len(override_dboard_pids)] - self.dboards = [] for dboard_idx, dboard_eeprom_path in enumerate(dboard_eeprom_paths): self.log.debug("Initializing dboard %d...", dboard_idx) dboard_eeprom_md, dboard_eeprom_rawdata = eeprom.read_eeprom( -- cgit v1.2.3