From f18a75d39969d602954ecb0f2522b0ab0f1b73a6 Mon Sep 17 00:00:00 2001 From: Peter Mosmans Date: Tue, 28 Feb 2017 12:52:54 +1100 Subject: [PATCH] Show filename when threatLevel is incorrect --- chatops/python/validate_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatops/python/validate_report.py b/chatops/python/validate_report.py index bf3ed55..affba9c 100644 --- a/chatops/python/validate_report.py +++ b/chatops/python/validate_report.py @@ -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])):