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:
parent
0a1367744f
commit
50fd8c9cc4
|
@ -98,12 +98,13 @@ class ConfigHelper:
|
||||||
raise ConfigError(
|
raise ConfigError(
|
||||||
f"No option found ({option}) in section [{self.section}]"
|
f"No option found ({option}) in section [{self.section}]"
|
||||||
) from None
|
) from None
|
||||||
return default
|
val = default
|
||||||
except Exception:
|
except Exception:
|
||||||
raise ConfigError(
|
raise ConfigError(
|
||||||
f"Error parsing option ({option}) from "
|
f"Error parsing option ({option}) from "
|
||||||
f"section [{self.section}]")
|
f"section [{self.section}]")
|
||||||
self._check_option(option, val, above, below, minval, maxval)
|
else:
|
||||||
|
self._check_option(option, val, above, below, minval, maxval)
|
||||||
if self.section in self.orig_sections:
|
if self.section in self.orig_sections:
|
||||||
# Only track sections included in the original config
|
# Only track sections included in the original config
|
||||||
if isinstance(val, GpioOutputPin):
|
if isinstance(val, GpioOutputPin):
|
||||||
|
|
Loading…
Reference in New Issue