From: Guillaume Pellerin Date: Tue, 31 Dec 2019 11:12:39 +0000 (+0100) Subject: [conf] fix XML parsing using xmltodict from pypi X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7877368afb02f76ef83ed8b6aded8aade72326f5;p=deefuzzer.git [conf] fix XML parsing using xmltodict from pypi --- diff --git a/deefuzzer/tools/utils.py b/deefuzzer/tools/utils.py index 3a1b783..7b74f07 100644 --- a/deefuzzer/tools/utils.py +++ b/deefuzzer/tools/utils.py @@ -16,6 +16,7 @@ import string import mimetypes from itertools import chain from deefuzzer.tools import * +import xmltodict mimetypes.add_type('application/x-yaml', '.yaml') @@ -90,7 +91,7 @@ def get_conf_dict(file): confile = open(file, 'r') data = confile.read() confile.close() - return xmltodict(data, 'utf-8') + return xmltodict.parse(data) elif 'yaml' in mime_type or 'yml' in mime_type: import yaml diff --git a/setup.py b/setup.py index 5c063f8..6f2f772 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ setup( 'pycurl', 'pyyaml', 'mysqlclient', + 'xmltodict', ], platforms=['OS Independent'], license='GPL v3',