mirror of
https://github.com/gryf/wicd.git
synced 2026-03-10 03:25:46 +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:
@@ -113,7 +113,8 @@ class ConfigManager(RawConfigParser):
|
|||||||
else:
|
else:
|
||||||
return None
|
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)
|
ret = RawConfigParser.get(self, section, option)
|
||||||
if (isinstance(ret, basestring) and ret.startswith(self.mrk_ws)
|
if (isinstance(ret, basestring) and ret.startswith(self.mrk_ws)
|
||||||
and ret.endswith(self.mrk_ws)):
|
and ret.endswith(self.mrk_ws)):
|
||||||
|
|||||||
Reference in New Issue
Block a user