aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/n3xx.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-03-13 16:16:02 -0700
committerMartin Braun <martin.braun@ettus.com>2018-03-13 16:19:03 -0700
commit398d7bb587d9e91d02400cbf022344be3ac26bbb (patch)
treee6c7cf0588a081823630af6e41d1444d08e3d1a1 /mpm/python/usrp_mpm/periph_manager/n3xx.py
parent5d35414ee461b7c298d8442e267d74c8c15fe3b2 (diff)
downloaduhd-398d7bb587d9e91d02400cbf022344be3ac26bbb.tar.gz
uhd-398d7bb587d9e91d02400cbf022344be3ac26bbb.tar.bz2
uhd-398d7bb587d9e91d02400cbf022344be3ac26bbb.zip
mpm: n3xx: Fix failure on get_device_info() when uninitialized
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/n3xx.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n3xx.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py
index ed75b1f51..6926ee1d7 100644
--- a/mpm/python/usrp_mpm/periph_manager/n3xx.py
+++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py
@@ -797,8 +797,9 @@ class n3xx(PeriphManagerBase):
"""
Append the device info with current IP addresses.
"""
- device_info = self._xport_mgrs['udp'].get_xport_info() \
- if self._device_initialized else {}
+ if not self._device_initialized:
+ return {}
+ device_info = self._xport_mgrs['udp'].get_xport_info()
device_info.update({
'fpga_version': "{}.{}".format(
*self.mboard_regs_control.get_compat_number())