Merge pull request #24 from PeterMosmans/validation

Show filename when threatLevel is incorrect
This commit is contained in:
John Sinteur 2017-03-06 12:00:56 +01:00 committed by GitHub
commit e34b93c809

View File

@ -354,8 +354,8 @@ def validate_type(tree, filename, options, speller):
else:
if attribute == 'threatLevel' and root.attrib[attribute] not in \
('Low', 'Moderate', 'Elevated', 'High', 'Extreme'):
print('[-] threatLevel is not Low, Moderate, High, Elevated or Extreme: {0}'.
format(root.attrib[attribute]))
print('[-] threatLevel is not Low, Moderate, High, Elevated or Extreme: {0} {1}'.
format(filename, root.attrib[attribute]))
result = False
if attribute == 'type' and (options['capitalization'] and not \
is_capitalized(root.attrib[attribute])):