From 680a7c30c2353656ba445fee2ab240ac0e6cb4ce Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Fri, 29 Nov 2024 13:09:10 +0100 Subject: [PATCH] Use only one config file in config.py Signed-off-by: Gabor Mezei --- tf-psa-crypto/scripts/tf_psa_crypto_config.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tf-psa-crypto/scripts/tf_psa_crypto_config.py b/tf-psa-crypto/scripts/tf_psa_crypto_config.py index b6437e7683..ef76d3b771 100755 --- a/tf-psa-crypto/scripts/tf_psa_crypto_config.py +++ b/tf-psa-crypto/scripts/tf_psa_crypto_config.py @@ -134,13 +134,13 @@ class TFPSACryptoConfig(config_common.Config): and modify the configuration. """ - def __init__(self, *configfiles): + def __init__(self, filename): """Read the PSA crypto configuration files.""" super().__init__() - self.configfiles.extend(configfiles) + configfile = TFPSACryptoConfigFile(filename) + self.configfiles.append(configfile) self.settings.update({name: config_common.Setting(configfile, active, name, value, section) - for configfile in configfiles for (active, name, value, section) in configfile.parse_file()}) def set(self, name, value=None): @@ -165,9 +165,8 @@ class TFPSACryptoConfigTool(config_common.ConfigTool): """Command line TF PSA Crypto config file manipulation tool.""" def __init__(self): - super().__init__(TFPSACryptoConfigFile.default_path[0], single_config=False) - configfiles = [TFPSACryptoConfigFile(file) for file in self.args.file] - self.config = TFPSACryptoConfig(*configfiles) + super().__init__(TFPSACryptoConfigFile.default_path[0]) + self.config = TFPSACryptoConfig(self.args.file) def custom_parser_options(self): """Adds TF PSA Crypto specific options for the parser."""