From 197dbedcc4d2e077254be63517187233417179f2 Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Sat, 27 Dec 2008 06:50:17 -0700 Subject: [PATCH] Remove and simplify use_wpa and use_dhcp in connect_to_network() --- wifi-radar | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wifi-radar b/wifi-radar index a52c570..ef2e06c 100755 --- a/wifi-radar +++ b/wifi-radar @@ -361,8 +361,7 @@ def connect_to_network( essid, bssid, status_win ): if os.path.isfile(confFile.get_opt('WPA.pidfile')): print "Stale pid file. Removing" os.remove(confFile.get_opt('WPA.pidfile')) - use_wpa = profile['use_wpa'] - if use_wpa : + if profile['use_wpa'] : wpa_options = list() wpa_options.append( confFile.get_opt('WPA.command') ) wpa_args = "-B -i " + confFile.get_opt('DEFAULT.interface') + " -c " + confFile.get_opt('WPA.configuration') + " -D " + profile['wpa_driver'] + " -P " + confFile.get_opt('WPA.pidfile') @@ -374,8 +373,7 @@ def connect_to_network( essid, bssid, status_win ): status_win.update_message("wpa supplicant") wpa_pid = os.spawnvp(os.P_NOWAIT, confFile.get_opt('WPA.command'), wpa_options) - use_dhcp = profile['use_dhcp'] - if use_dhcp : + if profile['use_dhcp'] : dhcp_options = list() dhcp_options.append(confFile.get_opt('DHCP.command')) dhcp_options.extend(confFile.get_opt('DHCP.args').split()) -- 2.11.4.GIT