1
0
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:
Tom Van Braeckel
2015-02-12 15:45:24 +01:00
parent ce65506676
commit 513a1a2215

View File

@@ -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)):