diff options
Diffstat (limited to 'src/config.py')
-rw-r--r-- | src/config.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.py b/src/config.py index 9cedcac7..ee37b9a9 100644 --- a/src/config.py +++ b/src/config.py @@ -35,6 +35,10 @@ class Config(RawConfigParser): self.file_name = file_name RawConfigParser.__init__(self, None) RawConfigParser.read(self, file_name) + # Check config integrity and fix it if it’s wrong + for section in ('bindings', 'var'): + if not self.has_section(section): + self.add_section(section) def get(self, option, default, section=DEFSECTION): """ |