mirror of
https://github.com/gryf/wicd.git
synced 2025-12-24 23:22:27 +01:00
Improve handling of None values in the configuration file
When wireless_interface is not filled in, it should be autodetected. But because this is set to None, the autodetection fails...
This commit is contained in:
@@ -112,8 +112,9 @@ class ConfigManager(RawConfigParser):
|
||||
self.add_section(section)
|
||||
else:
|
||||
return None
|
||||
|
||||
if self.has_option(section, option):
|
||||
|
||||
# If the option is present and not empty
|
||||
if self.has_option(section, option) and RawConfigParser.get(self, section, option) != "None":
|
||||
ret = RawConfigParser.get(self, section, option)
|
||||
if (isinstance(ret, basestring) and ret.startswith(self.mrk_ws)
|
||||
and ret.endswith(self.mrk_ws)):
|
||||
|
||||
Reference in New Issue
Block a user