From d723b51befa33e34edeeba6d732cab0c104329a8 Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Fri, 7 Jun 2024 15:31:52 +0200 Subject: [PATCH] Fix for crypto config default value Signed-off-by: Gabor Mezei --- scripts/config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/config.py b/scripts/config.py index 8fda2e2aab..0d65e771b0 100755 --- a/scripts/config.py +++ b/scripts/config.py @@ -599,12 +599,16 @@ class CryptoConfig(Config): for (active, name, value, section) in self.configfile.parse_file()}) - def set(self, name, value=None): + def set(self, name, value='1'): if name in UNSUPPORTED_FEATURE: raise ValueError(f'Feature is unsupported: \'{name}\'') if name in UNSTABLE_FEATURE: raise ValueError(f'Feature is unstable: \'{name}\'') + # The default value in the crypto config is '1' + if not value: + value = '1' + if name not in self.settings: self.configfile.templates.append((name, '', '#define ' + name + ' ')) @@ -655,6 +659,10 @@ class MultiConfig(Config): if name in UNSTABLE_FEATURE: raise ValueError(f'Feature is unstable: \'{name}\'') + # The default value in the crypto config is '1' + if not value: + value = '1' + if name not in self.settings: configfile.templates.append((name, '', '#define ' + name + ' '))