Projet

Général

Profil

0006-toulouse_axel-prepare-a-future-zeep-upgrade-38543.patch

Lauréline Guérin, 14 janvier 2020 15:40

Télécharger (1,29 ko)

Voir les différences:

Subject: [PATCH 6/6] toulouse_axel: prepare a future zeep upgrade (#38543)

Here toulouse axel sends headers like:
<?xml version="1.0" encoding="ISO-8859-1"?>
If there in accents in data, it fails with zeep < 3 on log encoding.
It is fixed in zeep 3.0.2:
https://github.com/mvantellingen/python-zeep/commit/7277be32d5921b0b5f1c250fe607d74aaee2125f
But we need to encode the result for ET.fromstring
 passerelle/contrib/toulouse_axel/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
passerelle/contrib/toulouse_axel/models.py
217 217
            force_text(serialized_request),
218 218
            '')  # FIXME: What is the user parameter for ?
219 219

  
220
        xml_result = ET.fromstring(result)
220
        xml_result = ET.fromstring(result.encode('utf-8'))
221 221
        indent(xml_result)
222 222
        pretty_result = ET.tostring(xml_result)
223 223
        if xml_result.find('RESULTAT/STATUS').text != 'OK':
224
-