diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2019-08-26 15:58:50 +0200 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2019-08-26 15:58:50 +0200 |
commit | daab3079f0192d9c2ad7c9321e6ecc2d42cd384d (patch) | |
tree | 1ab8ff960cbe6766f42bc511cf968805f1e05f8c /pykolab/conf/__init__.py | |
parent | 00080f3bb1e232ddb647e619ba41dca0284772de (diff) | |
download | pykolab-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__.py | 4 |
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, |