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 81cf5ad commit bc707b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/scripts/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,12 @@ def set_config_option_value(conf, option, colors, value: Union[bool, str]):
if value is False:
log_command(['config.py', 'unset', option])
conf.unset(option)
elif value is True:
log_command(['config.py', 'set', option])
conf.set(option)
else:
if value is True:
log_command(['config.py', 'set', option])
conf.set(option)
else:
log_command(['config.py', 'set', option, value])
conf.set(option, value)
log_command(['config.py', 'set', option, value])
conf.set(option, value)
return True

def set_reference_config(conf, options, colors):
Expand Down

0 comments on commit bc707b5

Please sign in to comment.