From e56d9188f77e5463c87c0fa923b3d09294930bfc Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 19 Jul 2018 08:40:14 -0700 Subject: mpm: uio: Fix use of logger When logger==None, it uio.py would fail. --- mpm/python/usrp_mpm/sys_utils/uio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mpm/python/usrp_mpm') 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)) -- cgit v1.2.3