depends.py: Do not fail when disabling a non-existing option

To ease the removal of legacy crypto options, do not
fail in depends.py when disabling a non-existing option.
This mimics the behavior of 'config.py unset'.

Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
Ronald Cron
2025-07-10 19:16:10 +02:00
parent c1d9531c56
commit d5da020a63
+2
View File
@@ -109,6 +109,8 @@ def set_config_option_value(conf, option, colors, value: Union[bool, str]):
value can be either True/False (set/unset config option), or a string,
which will make a symbol defined with a certain value."""
if not option_exists(conf, option):
if value is False:
return True
log_line('Symbol {} was not found in {}'.format(option, conf.filename), color=colors.red)
return False