Minor PR comments addressed

This commit is contained in:
VakarisZ 2019-04-11 14:48:40 +03:00
parent 5944908f28
commit 2106d6dd0b
1 changed files with 4 additions and 2 deletions

View File

@ -86,7 +86,9 @@ def r_set_booleans(path, value, attack_techniques, monkey_config):
# If 'value' is a boolean value that should be set:
if 'type' in value and value['type'] == 'boolean' and 'attack_techniques' in value:
try:
set_bool_conf_val(path, should_enable_field(value['attack_techniques'], attack_techniques), monkey_config)
set_bool_conf_val(path,
should_enable_field(value['attack_techniques'], attack_techniques),
monkey_config)
except KeyError:
# Monkey schema has a technique that is not yet implemented
pass
@ -154,7 +156,7 @@ def get_technique_values():
"""
attack_config = get_config()
techniques = {}
for key, attack_type in attack_config['properties'].items():
for type_name, attack_type in attack_config['properties'].items():
for key, technique in attack_type['properties'].items():
techniques[key] = technique['value']
return techniques