From e7d5a635a15558aa1fb6b4c48efdc5ae3ea709fb Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Thu, 11 Feb 2016 14:10:58 +0100 Subject: [PATCH] To be UTF-8 consistent --- tools/machinetag.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/machinetag.py b/tools/machinetag.py index 9ce45e4..3e3c0e3 100755 --- a/tools/machinetag.py +++ b/tools/machinetag.py @@ -30,8 +30,7 @@ import json import os.path import argparse -taxonomies = ['admiralty-scale', 'adversary', 'tlp', 'circl', 'veris', 'ecsirt', 'dni-ism', 'nato', 'euci', 'osint', 'first_csirt_case_classification', 'malware'] - +taxonomies = ['admiralty-scale', 'adversary', 'tlp', 'circl', 'veris', 'ecsirt', 'dni-ism', 'nato', 'euci', 'osint', 'first_csirt_case_classification', 'malware', 'de-vs'] argParser = argparse.ArgumentParser(description='Dump Machine Tags (Triple Tags) from MISP taxonomies') argParser.add_argument('-e', action='store_true', help='Include expanded tags') argParser.add_argument('-a', action='store_true', help='Generate asciidoctor document from MISP taxonomies') @@ -70,9 +69,9 @@ def machineTag(namespace=False, predicate=False, value=None): if namespace is False or predicate is False: return None if value is None: - return ('{0}:{1}'.format(namespace, predicate)) + return (u'{0}:{1}'.format(namespace, predicate)) else: - return ('{0}:{1}=\"{2}\"'.format(namespace, predicate, value)) + return (u'{0}:{1}=\"{2}\"'.format(namespace, predicate, value)) for taxonomy in taxonomies: filename = os.path.join("../", taxonomy, "machinetag.json")