Also catch errors on config save
This commit is contained in:
parent
c7515605a7
commit
a41b036155
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,11 @@ class Config(RawConfigParser):
|
|||
set the value in the configuration then save it
|
||||
to the file
|
||||
"""
|
||||
RawConfigParser.set(self, section, option, value)
|
||||
try:
|
||||
RawConfigParser.set(self, section, option, value)
|
||||
except NoSectionError:
|
||||
# TODO, add this section if it didn't exist
|
||||
return
|
||||
self.write_in_file(section, option, value)
|
||||
|
||||
# creates the configuration directory if it doesn't exist
|
||||
|
|
Loading…
Reference in a new issue