summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Boddie <paul@boddie.org.uk>2014-02-16 02:31:25 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-16 02:31:37 +0100
commitbfaca366702ac2beec253f7a322fb366289f335d (patch)
treedfd35dba3b9b8dc1f59426a888e6113811f5a0d1
parent46bf18a4a34e4486afdd5eca01a01699c7c8c33b (diff)
downloadpykolab-bfaca366702ac2beec253f7a322fb366289f335d.tar.gz
Added missing initialisation operations.
-rw-r--r--pykolab/conf/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py
index 239c0dd..675944a 100644
--- a/pykolab/conf/__init__.py
+++ b/pykolab/conf/__init__.py
@@ -446,11 +446,15 @@ class Conf(object):
setattr(self,option,self.cli_parser.defaults[option])
def has_section(self, section):
- self.read_config()
+ if not self.cfg_parser:
+ self.read_config()
return self.cfg_parser.has_section(section)
def has_option(self, section, option):
+ if not self.cfg_parser:
+ self.read_config()
+
return self.cfg_parser.has_option(section, option)
def get_list(self, section, key):