diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-22 13:28:11 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | e9a1af171eecb333326b3d791fd6516788ec7cac (patch) | |
tree | ff2a7f1c4f53e414aa6aa78c00a2ca5e87b1fc53 /mpm/python/usrp_mpm/net.py | |
parent | d52ec83e908028929994656c13d7bf988d3ce2ad (diff) | |
download | uhd-e9a1af171eecb333326b3d791fd6516788ec7cac.tar.gz uhd-e9a1af171eecb333326b3d791fd6516788ec7cac.tar.bz2 uhd-e9a1af171eecb333326b3d791fd6516788ec7cac.zip |
mpm: Better handling of case where no CHDR interfaces are available
Diffstat (limited to 'mpm/python/usrp_mpm/net.py')
-rw-r--r-- | mpm/python/usrp_mpm/net.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/net.py b/mpm/python/usrp_mpm/net.py index 29c1bcab9..78895a0bb 100644 --- a/mpm/python/usrp_mpm/net.py +++ b/mpm/python/usrp_mpm/net.py @@ -37,7 +37,8 @@ def get_valid_interfaces(iface_list): continue valid_iface_idx = valid_iface_idx[0] link_info = ipr.get_links(valid_iface_idx)[0] - if link_info.get_attr('IFLA_OPERSTATE') == 'UP': + if link_info.get_attr('IFLA_OPERSTATE') == 'UP' \ + and len(get_iface_addrs(link_info.get_attr('IFLA_ADDRESS'))): assert link_info.get_attr('IFLA_IFNAME') == iface valid_ifaces.append(iface) ipr.close() |