diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-28 15:20:12 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-28 15:20:12 -0800 |
commit | c73a013d015ca576639fc238fbde1ea7dccc124c (patch) | |
tree | 2f3fada796a2c8e2c9d89830e832dba6a6a5cc76 /mpm/python/usrp_mpm/periph_manager/base.py | |
parent | 5829feefc693101f78602f0aa71b224bc18fef3d (diff) | |
download | uhd-c73a013d015ca576639fc238fbde1ea7dccc124c.tar.gz uhd-c73a013d015ca576639fc238fbde1ea7dccc124c.tar.bz2 uhd-c73a013d015ca576639fc238fbde1ea7dccc124c.zip |
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.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/base.py')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
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( |