From 49839b2e819bf557e9e10adfd9dd6eecef8d8bcf Mon Sep 17 00:00:00 2001 From: kriss Date: Sat, 26 Jul 2008 18:14:07 +0000 Subject: [PATCH] BUGFIX: Allow for stratup without root access (to WiFi interface) git-svn-id: http://www.neo1973-germany.de/svn@85 46df4e5c-bc4e-4628-a0fc-830ba316316d --- SettingsGUI/trunk/src/settingsgui/MofiPanel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SettingsGUI/trunk/src/settingsgui/MofiPanel.py b/SettingsGUI/trunk/src/settingsgui/MofiPanel.py index 76d4cf9..930f467 100644 --- a/SettingsGUI/trunk/src/settingsgui/MofiPanel.py +++ b/SettingsGUI/trunk/src/settingsgui/MofiPanel.py @@ -53,7 +53,12 @@ class MofiPanel(gtk.VBox): wifi = Wireless(ifname) essid = wifi.getEssid() - wifi.scan() + try: + wifi.scan() + except(RuntimeError): + print "could not scan for WiFi networks, may need root permission" + return [] + for results in wifi.scan(): enc_type = "unknown"