summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
Diffstat (limited to 'textw')
-rw-r--r--textw/network_text.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/textw/network_text.py b/textw/network_text.py
index 876bbc1a6..3a5026743 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -392,13 +392,14 @@ class NetworkDeviceWindow:
if valsgood == 0:
continue
- try:
- (net, bc) = isys.inet_calcNetBroad (tmpvals['ipaddr'],
- tmpvals['netmask'])
- except Exception, e:
- print e
- handleBroadCastError()
- valsgood = 0
+ if self.ipv4Cb.selected():
+ try:
+ (net, bc) = isys.inet_calcNetBroad (tmpvals['ipaddr'],
+ tmpvals['netmask'])
+ except Exception, e:
+ print e
+ handleBroadCastError()
+ valsgood = 0
if not valsgood:
continue
@@ -421,7 +422,8 @@ class NetworkDeviceWindow:
else:
dev.set((t, entrys[t].value()))
- dev.set(('network', net), ('broadcast', bc))
+ if self.ipv4Cb.selected():
+ dev.set(('network', net), ('broadcast', bc))
break