From 3ebe7d62609b58011cb3a011978bc677453b7bb5 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Mon, 6 Feb 2023 10:48:43 +0100 Subject: [PATCH] Improve tests/scripts/depends.py code As suggested by gilles-peskine-arm. Co-authored-by: Gilles Peskine Signed-off-by: Andrzej Kurek --- tests/scripts/depends.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py index 9c3c49a9a9..e604512d10 100755 --- a/tests/scripts/depends.py +++ b/tests/scripts/depends.py @@ -126,9 +126,7 @@ Remove the backup file if it was saved earlier.""" shutil.copy(options.config_backup, options.config) def option_exists(conf, option): - if option not in conf.settings: - return False - return True + return option in conf.settings def set_config_option_value(conf, option, colors, value: Union[bool, str]): """Set/unset a configuration option, optionally specifying a value.