summaryrefslogtreecommitdiff
path: root/src/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.py')
-rw-r--r--src/config.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/config.py b/src/config.py
index eaadb9d6..390fe7f1 100644
--- a/src/config.py
+++ b/src/config.py
@@ -153,9 +153,11 @@ class Config(RawConfigParser):
except TypeError: # python < 3.2 sucks
RawConfigParser.read(self, 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)
+ # only when the object is the main config
+ if self.__class__ is Config:
+ for section in ('bindings', 'var'):
+ if not self.has_section(section):
+ self.add_section(section)
def get(self, option, default=None, section=DEFSECTION):
"""