From 5315a7fab9bc85de189461bb5a6de9d56aa207fb Mon Sep 17 00:00:00 2001 From: "alnus@disroot.org" Date: Sat, 31 Oct 2020 03:29:32 +0000 Subject: [PATCH] encode xml FossilOrigin-Name: fb4563f3b117dfdd0be637c93efe2197bb49d15a436d882b4ad650b681c205b3 --- facho/fe/form_xml/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facho/fe/form_xml/utils.py b/facho/fe/form_xml/utils.py index ab626c2..1b4a04a 100644 --- a/facho/fe/form_xml/utils.py +++ b/facho/fe/form_xml/utils.py @@ -9,7 +9,7 @@ def DIANWrite(xml, filename): def DIANWriteSigned(xml, filename, private_key, passphrase, use_cache_policy=False): - document = xml.tostring(xml_declaration=True, encoding='UTF-8') + document = xml.tostring(xml_declaration=True, encoding='UTF-8').encode('utf-8') signer = fe.DianXMLExtensionSigner(private_key, passphrase=passphrase, mockpolicy=use_cache_policy) with open(filename, 'w') as f: f.write(signer.sign_xml_string(document))