Pylint fixes

This commit is contained in:
Peter Mosmans 2016-09-13 19:26:43 +10:00
parent 5476c0f466
commit 17da0c9846

View File

@ -313,7 +313,8 @@ def validate_type(tree, filename, options):
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}'.
format(root.attrib[attribute]))
result = False
if attribute == 'type' and (options['capitalization'] and not \
is_capitalized(root.attrib[attribute])):
@ -472,6 +473,7 @@ def add_include(filename, identifier, findings):
finding_section.append(new_finding)
tree.write(filename, encoding="utf-8", xml_declaration=True, pretty_print=True)
def close_file(filename):
"""
Replace placeholder with proper XML include.