diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-12-04 15:47:53 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-12-04 15:47:53 -0300 |
commit | 27bda0ac201e236e3a2c9671462a337f2970e993 (patch) | |
tree | 5246972dfc11babd5b822231e334934020b83672 /server/src | |
parent | 7208d8bc5e5f23d0773533b15763f64d236489b4 (diff) |
[bug] skip missing keys on existing sections
While parsing the configuration file, if a key doesnt exist we need to
skip it.
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/leap/soledad/server/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/__init__.py b/server/src/leap/soledad/server/__init__.py index 39edcc1b..22894dac 100644 --- a/server/src/leap/soledad/server/__init__.py +++ b/server/src/leap/soledad/server/__init__.py @@ -293,7 +293,9 @@ def load_configuration(file_path): if not config.has_section(section): continue for key, value in defaults[section].items(): - if type(value) == bool: + if not config.has_option(section, key): + continue + elif type(value) == bool: defaults[section][key] = config.getboolean(section, key) elif type(value) == list: values = config.get(section, key).split(',') |