From 0985131a327d131b910fc67ed486ff8a7562882a Mon Sep 17 00:00:00 2001 From: Matthew Reggers Date: Tue, 19 May 2020 15:49:08 +0700 Subject: [PATCH] Changed ElementTree.tostring to return unicode, so it returns a string and not bytes. Fixes https://github.com/jssimporter/python-jss/issues/97 --- jss/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jss/tools.py b/jss/tools.py index 9619d96..bd8b84c 100644 --- a/jss/tools.py +++ b/jss/tools.py @@ -156,7 +156,7 @@ def element_str(elem): # deepcopy so we don't mess with the valid XML. pretty_data = copy.deepcopy(elem) indent_xml(pretty_data) - return ElementTree.tostring(pretty_data, encoding='UTF-8') + return ElementTree.tostring(pretty_data, encoding='unicode') def quote_and_encode(string):