aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.com>2010-06-05 17:49:09 -0300
committerEugeni Dodonov <eugeni@mandriva.com>2010-06-05 17:49:09 -0300
commitc1691dc269dd1f50e7f9d5c60bde9e776c093242 (patch)
treee3855d8542cc68e3a7ca4cde61535c5db7164635
parentc48c9cfc1cdbcb71d236f2f7852626289947f14c (diff)
downloadnet_monitor-c1691dc269dd1f50e7f9d5c60bde9e776c093242.tar
net_monitor-c1691dc269dd1f50e7f9d5c60bde9e776c093242.tar.gz
net_monitor-c1691dc269dd1f50e7f9d5c60bde9e776c093242.tar.bz2
net_monitor-c1691dc269dd1f50e7f9d5c60bde9e776c093242.tar.xz
net_monitor-c1691dc269dd1f50e7f9d5c60bde9e776c093242.zip
do not crash with invalid native values
-rw-r--r--src/monitor.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/monitor.py b/src/monitor.py
index b330409..da525be 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -54,11 +54,22 @@ class Monitor:
def wifi_get_max_quality(self, iface):
"""Gets maximum quality value"""
- return _native.wifi_get_max_quality(iface)
+ try:
+ ret = _native.wifi_get_max_quality(iface)
+ return ret
+ except:
+ traceback.print_exc()
+ return _("Unknown")
def wifi_get_ap(self, iface):
"""Gets access point address"""
return _native.wifi_get_ap(iface)
+ try:
+ ret = _native.wifi_get_ap(iface)
+ return ret
+ except:
+ traceback.print_exc()
+ return _("Unknown")
def wifi_get_essid(self, iface):
"""Get current essid for an interface"""