Fix missing options when setting

This commit is contained in:
Florian Bruhin 2014-04-10 12:03:42 +02:00
parent c1df7cd1fc
commit 1a20bbe7d0

View File

@ -261,7 +261,10 @@ class Config:
sectdict = self.config[section]
except KeyError:
raise NoSectionError(section)
sectdict[self.optionxform(option)] = value
try:
sectdict[self.optionxform(option)] = value
except KeyError:
raise NoOptionError(option, section)
def save(self):
"""Save the config file."""