diff --git a/wicd/configmanager.py b/wicd/configmanager.py index ae63a31..d026170 100644 --- a/wicd/configmanager.py +++ b/wicd/configmanager.py @@ -113,8 +113,7 @@ class ConfigManager(RawConfigParser): else: return None - # If the option is present and not empty - if self.has_option(section, option) and RawConfigParser.get(self, section, option) != "None": + if self.has_option(section, option): ret = RawConfigParser.get(self, section, option) if (isinstance(ret, basestring) and ret.startswith(self.mrk_ws) and ret.endswith(self.mrk_ws)): @@ -131,7 +130,7 @@ class ConfigManager(RawConfigParser): else: print ''.join(['found ', option, ' in configuration ', str(ret)]) - else: + else: # Use the default, unless no default was provided if default != "__None__": print 'did not find %s in configuration, setting default %s' \ % (option, str(default)) diff --git a/wicd/wicd-daemon.py b/wicd/wicd-daemon.py index cd49dc6..614ac84 100644 --- a/wicd/wicd-daemon.py +++ b/wicd/wicd-daemon.py @@ -162,6 +162,7 @@ class WicdDaemon(dbus.service.Object, object): def SetWiredInterface(self, interface): """ Sets the wired interface for the daemon to use. """ print "setting wired interface %s" % (str(interface)) + # Set it to a blank string, otherwise a network card named "None" will be searched self.wired.wired_interface = noneToBlankString(interface) self.config.set("Settings", "wired_interface", interface, write=True) @@ -169,6 +170,7 @@ class WicdDaemon(dbus.service.Object, object): def SetWirelessInterface(self, interface): """ Sets the wireless interface the daemon will use. """ print "setting wireless interface %s" % (str(interface)) + # Set it to a blank string, otherwise a network card named "None" will be searched self.wifi.wireless_interface = noneToBlankString(interface) self.config.set("Settings", "wireless_interface", interface, write=True)