Skip to content

Commit

Permalink
Improve tests/scripts/depends.py code
Browse files Browse the repository at this point in the history
As suggested by gilles-peskine-arm.

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
  • Loading branch information
Andrzej Kurek and gilles-peskine-arm authored Feb 6, 2023
1 parent 576803f commit 81cf5ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/scripts/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ def restore_config(options):
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.
Expand Down

0 comments on commit 81cf5ad

Please sign in to comment.