Fix unicode error in sigma2attack

This commit is contained in:
Olivier Caillault 2020-11-05 22:30:12 +01:00
parent 6dfeb6a63b
commit 31639366cd

View File

@ -21,7 +21,7 @@ def main():
num_rules_used = 0
for rule_file in rule_files:
try:
rule = yaml.safe_load(open(rule_file).read())
rule = yaml.safe_load(open(rule_file, encoding="utf-8").read())
except yaml.YAMLError:
sys.stderr.write("Ignoring rule " + rule_file + " (parsing failed)\n")
continue