From da54e6033b12e264e27f25779e288f3367c700f2 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Sun, 28 Dec 2008 16:19:18 -0500 Subject: [PATCH] Fix bug where the daemon could crash if an encryption key was entered for a network without encryption on. Some minor code formatting changes Replace "new" with "experimental" in description for ioctl backend. --- wicd/backends/be-ioctl.py | 2 +- wicd/gui.py | 2 +- wicd/networking.py | 2 +- wicd/wicd-daemon.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wicd/backends/be-ioctl.py b/wicd/backends/be-ioctl.py index b100201..b7b4555 100644 --- a/wicd/backends/be-ioctl.py +++ b/wicd/backends/be-ioctl.py @@ -49,7 +49,7 @@ import array NAME = "ioctl" UPDATE_INTERVAL = 4 -DESCRIPTION = """IOCTL (new) backend +DESCRIPTION = """IOCTL (experimental) backend This backend uses IOCTL calls and python libraries to query network information whenever possible. This makes it fast, diff --git a/wicd/gui.py b/wicd/gui.py index 8d9f935..39dad83 100644 --- a/wicd/gui.py +++ b/wicd/gui.py @@ -738,7 +738,7 @@ class appGui(object): self._save_gen_settings(entry) entry.set_net_prop("automatic", noneToString(netent.chkbox_autoconnect.get_active())) - + if entry.chkbox_global_settings.get_active(): entry.set_net_prop('use_settings_globally', True) else: diff --git a/wicd/networking.py b/wicd/networking.py index ae9832a..6193e86 100644 --- a/wicd/networking.py +++ b/wicd/networking.py @@ -780,7 +780,7 @@ class WirelessConnectThread(ConnectThread): # cards). if self.debug: print "enctype is %s" % self.network.get('enctype') - if self.network.get('key') and 'wpa' in self.network.get('enctype'): + if self.network.get('key') and 'wpa' in str(self.network.get('enctype')): self.SetStatus('generating_psk') print 'Generating psk...' self.network['psk'] = wiface.GeneratePSK(self.network) diff --git a/wicd/wicd-daemon.py b/wicd/wicd-daemon.py index 739e43c..083884e 100644 --- a/wicd/wicd-daemon.py +++ b/wicd/wicd-daemon.py @@ -104,7 +104,7 @@ class WicdDaemon(dbus.service.Object): # This will speed up the scanning process - if a client doesn't # need a fresh scan, just feed them the old one. A fresh scan # can be done by calling Scan(fresh=True). - self.LastScan = '' + self.LastScan = [] signal.signal(signal.SIGTERM, self.DaemonClosing) self.DaemonStarting()