From ee00c0384e6158766a12fe7806375433dddca7a2 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 28 Nov 2017 13:43:46 -0800 Subject: mpm: mg: Move some class attributes to local scopes The clock_synchronizer, jesdcore, and dboard_clk_control objects don't need to exist for the full lifetime of the Magnesium class. Having them around complicates management of UIO file descriptors. --- mpm/python/usrp_mpm/chips/lmk04828.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mpm/python/usrp_mpm/chips') diff --git a/mpm/python/usrp_mpm/chips/lmk04828.py b/mpm/python/usrp_mpm/chips/lmk04828.py index 3d979e65e..2dc603da3 100644 --- a/mpm/python/usrp_mpm/chips/lmk04828.py +++ b/mpm/python/usrp_mpm/chips/lmk04828.py @@ -29,7 +29,9 @@ class LMK04828(object): LMK_CHIP_ID = 6 def __init__(self, regs_iface, parent_log=None): - self.log = parent_log.getChild("LMK04828") or get_logger("LMK04828") + self.log = \ + parent_log.getChild("LMK04828") if parent_log is not None \ + else get_logger("LMK04828") self.regs_iface = regs_iface assert hasattr(self.regs_iface, 'peek8') assert hasattr(self.regs_iface, 'poke8') -- cgit v1.2.3