summaryrefslogtreecommitdiffstats
path: root/pykolab/conf/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-08-26 15:58:50 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-08-26 15:58:50 +0200
commitdaab3079f0192d9c2ad7c9321e6ecc2d42cd384d (patch)
tree1ab8ff960cbe6766f42bc511cf968805f1e05f8c /pykolab/conf/__init__.py
parent00080f3bb1e232ddb647e619ba41dca0284772de (diff)
downloadpykolab-daab3079f0192d9c2ad7c9321e6ecc2d42cd384d.tar.gz
Ensure a missing setting isn't treated as a string
Diffstat (limited to 'pykolab/conf/__init__.py')
-rw-r--r--pykolab/conf/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py
index c5ed1d5..9ea503b 100644
--- a/pykolab/conf/__init__.py
+++ b/pykolab/conf/__init__.py
@@ -505,13 +505,15 @@ class Conf(object):
return values
- def get_raw(self, section, key):
+ def get_raw(self, section, key, default=None):
if not self.cfg_parser:
self.read_config()
if self.cfg_parser.has_option(section, key):
return self.cfg_parser.get(section,key, 1)
+ return default
+
def get(self, section, key, quiet=False):
"""
Get a configuration option from our store, the configuration file,