aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-19 08:40:14 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-19 10:31:40 -0700
commite56d9188f77e5463c87c0fa923b3d09294930bfc (patch)
tree6d2edd762ba132bfd5ac6c78da8908024a803165 /mpm
parent04064035f492bf2b15d57d1ba2b313ab87e36959 (diff)
downloaduhd-e56d9188f77e5463c87c0fa923b3d09294930bfc.tar.gz
uhd-e56d9188f77e5463c87c0fa923b3d09294930bfc.tar.bz2
uhd-e56d9188f77e5463c87c0fa923b3d09294930bfc.zip
mpm: uio: Fix use of logger
When logger==None, it uio.py would fail.
Diffstat (limited to 'mpm')
-rw-r--r--mpm/python/usrp_mpm/sys_utils/uio.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/sys_utils/uio.py b/mpm/python/usrp_mpm/sys_utils/uio.py
index 2fa99e2b6..c99041492 100644
--- a/mpm/python/usrp_mpm/sys_utils/uio.py
+++ b/mpm/python/usrp_mpm/sys_utils/uio.py
@@ -77,7 +77,8 @@ def find_uio_device(label, logger=None):
logger.trace("Found the following UIO devices: `{0}'".format(','.join(uio_devices)))
for uio_device in uio_devices:
map0_info = get_uio_map_info(uio_device, 0)
- logger.trace("{0} has map info: {1}".format(uio_device, map0_info))
+ if logger:
+ logger.trace("{0} has map info: {1}".format(uio_device, map0_info))
if map0_info.get('name') == label:
if logger:
logger.trace("Device matches label: `{0}'".format(uio_device))