diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-02-28 15:20:58 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-28 15:20:58 -0800 |
commit | 7e5fffa3cc102d479c2547d70951890b1f012e06 (patch) | |
tree | 8000e0435d86175ac42ac3caac4c3ec5a66b2fa2 /mpm | |
parent | c73a013d015ca576639fc238fbde1ea7dccc124c (diff) | |
download | uhd-7e5fffa3cc102d479c2547d70951890b1f012e06.tar.gz uhd-7e5fffa3cc102d479c2547d70951890b1f012e06.tar.bz2 uhd-7e5fffa3cc102d479c2547d70951890b1f012e06.zip |
mpm: n310: Default-initialize some members
This allows flawless execution of code paths regardless of
initialization status.
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n310.py | 8 |
1 files changed, 4 insertions, 4 deletions
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: |