summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-12-04 15:47:53 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-12-04 15:47:53 -0300
commit27bda0ac201e236e3a2c9671462a337f2970e993 (patch)
tree5246972dfc11babd5b822231e334934020b83672
parent7208d8bc5e5f23d0773533b15763f64d236489b4 (diff)
[bug] skip missing keys on existing sections
While parsing the configuration file, if a key doesnt exist we need to skip it.
-rw-r--r--server/src/leap/soledad/server/__init__.py4
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(',')