Fix missing options when setting
This commit is contained in:
parent
c1df7cd1fc
commit
1a20bbe7d0
@ -261,7 +261,10 @@ class Config:
|
|||||||
sectdict = self.config[section]
|
sectdict = self.config[section]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise NoSectionError(section)
|
raise NoSectionError(section)
|
||||||
sectdict[self.optionxform(option)] = value
|
try:
|
||||||
|
sectdict[self.optionxform(option)] = value
|
||||||
|
except KeyError:
|
||||||
|
raise NoOptionError(option, section)
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
"""Save the config file."""
|
"""Save the config file."""
|
||||||
|
Loading…
Reference in New Issue
Block a user