small improvement in the health check for tech. YAML files

master
Marcus Bakker 2019-05-15 11:00:33 +02:00
parent e745b3bfe4
commit 7c027606d9
1 changed files with 6 additions and 5 deletions

View File

@ -451,12 +451,12 @@ def check_yaml_file_health(filename, file_type):
print('[!] Technique ID: ' + tech + ' has an INVALID data format for the key-value pair '
'in detection: ' + key + ' (should be YYYY-MM-DD)')
for key in ['location', 'applicable_to']:
try:
if detection[key][0] is None:
print('[!] Technique ID: ' + tech + ' is has an EMPTY key-value pair in detection: ' + key)
except TypeError:
for key in ['location', 'applicable_to']:
try:
if detection[key][0] is None:
print('[!] Technique ID: ' + tech + ' is has an EMPTY key-value pair in detection: ' + key)
except TypeError:
print('[!] Technique ID: ' + tech + ' is has an EMPTY key-value pair in detection: ' + key)
except KeyError:
pass
@ -476,3 +476,4 @@ def check_yaml_file_health(filename, file_type):