if parameter supplied to the config, overwrite also conditional init options (from `init?...` section)

pull/4069/head
sebres 2025-09-11 19:39:06 +02:00
parent ce8cc5d261
commit 3fd3454146
1 changed files with 5 additions and 0 deletions

View File

@ -354,6 +354,11 @@ class DefinitionInitConfigReader(ConfigReader):
if v is None: v = getopt(opt)
self._initOpts['known/'+opt] = v
if opt not in self._initOpts:
# overwrite also conditional init options (from init?... section):
cond = SafeConfigParserWithIncludes.CONDITIONAL_RE.match(opt)
if cond:
optc, cond = cond.groups()
v = pOpts.get(optc, v)
if v is None: v = getopt(opt)
self._initOpts[opt] = v
if all and self.has_section("Definition"):