confighelper: track default values

This restores the behavior before commit 5b4de64.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-11-23 13:55:24 -05:00
parent 0a1367744f
commit 50fd8c9cc4
1 changed files with 3 additions and 2 deletions

View File

@ -98,11 +98,12 @@ class ConfigHelper:
raise ConfigError(
f"No option found ({option}) in section [{self.section}]"
) from None
return default
val = default
except Exception:
raise ConfigError(
f"Error parsing option ({option}) from "
f"section [{self.section}]")
else:
self._check_option(option, val, above, below, minval, maxval)
if self.section in self.orig_sections:
# Only track sections included in the original config