mirror of
https://github.com/gryf/wicd.git
synced 2026-01-09 23:34:17 +01:00
Wireless network interface should only be auto-detected when nothing is specified in /etc/wicd/manager-settings.conf
If the user makes this empty, it will not be autodetected anymore.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user