From 7e5fffa3cc102d479c2547d70951890b1f012e06 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 28 Feb 2018 15:20:58 -0800 Subject: mpm: n310: Default-initialize some members This allows flawless execution of code paths regardless of initialization status. --- mpm/python/usrp_mpm/periph_manager/n310.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mpm/python/usrp_mpm/periph_manager') diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py index beef6048c..07e432278 100644 --- a/mpm/python/usrp_mpm/periph_manager/n310.py +++ b/mpm/python/usrp_mpm/periph_manager/n310.py @@ -511,10 +511,6 @@ class n310(PeriphManagerBase): # Ctor and device initialization tasks ########################################################################### def __init__(self, args): - super(n310, self).__init__(args) - if not self._device_initialized: - # Don't try and figure out what's going on. Just give up. - return self._tear_down = False self._status_monitor_thread = None self._ext_clock_freq = None @@ -522,6 +518,10 @@ class n310(PeriphManagerBase): self._time_source = None self._available_endpoints = list(range(256)) self._bp_leds = None + super(n310, self).__init__(args) + if not self._device_initialized: + # Don't try and figure out what's going on. Just give up. + return try: self._init_peripherals(args) except Exception as ex: -- cgit v1.2.3