diff options
author | Josh Blum <josh@joshknows.com> | 2012-05-09 18:29:48 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-05-09 18:29:48 -0700 |
commit | a6845bd0dd8cf34f0e62d7484267e7c581815af0 (patch) | |
tree | 08d6066969607465750cb4f77bbda13ba3e813c8 /host | |
parent | 8a98d68933265f043bf95f9f273f9829619114c8 (diff) | |
download | uhd-a6845bd0dd8cf34f0e62d7484267e7c581815af0.tar.gz uhd-a6845bd0dd8cf34f0e62d7484267e7c581815af0.tar.bz2 uhd-a6845bd0dd8cf34f0e62d7484267e7c581815af0.zip |
n2xx: fix possible attribute error in netburner win_get_interfaces
It is possible on some machines (at least one in this case),
for adNode to not have the attribute next. Unexplained...
This may be a fix, and if not, should be harmless.
Diffstat (limited to 'host')
-rwxr-xr-x | host/utils/usrp_n2xx_net_burner.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py index 835ab696f..f38a72fa1 100755 --- a/host/utils/usrp_n2xx_net_burner.py +++ b/host/utils/usrp_n2xx_net_burner.py @@ -205,9 +205,9 @@ def win_get_interfaces(): hexMask = struct.unpack("<L", socket.inet_aton(ipMask))[0] if(hexAddr and hexMask): #don't broadcast on 255.255.255.255, that's just lame yield socket.inet_ntoa(struct.pack("<L", (hexAddr & hexMask) | (~hexMask) & 0xFFFFFFFF)) - adNode = adNode.next - if not adNode: - break + try: adNode = adNode.next + except: break + if not adNode: break def enumerate_devices(): for bcast_addr in get_interfaces(): |