xml: force return of unicode string
With Python 3.8, the xml.etree.ElementTree.ElementTree function now preserves the attribute order specified by the user. This change broke the winrm enable functionality, throwing the erorr: ``` TypeError: Objects of type 'bytes' can not be converted to Unicode. ``` The fix was to set the correct parameter to return an unicode string and not bytes. Change-Id: I10f7fa357267f36dfed03ccb708694f6fc1cdd97
This commit is contained in:
parent
e192f67f71
commit
072bee9c5d
@ -191,5 +191,5 @@ class WinRMConfig(object):
|
||||
new_value = self._get_xml_bool(value)
|
||||
if node.text.lower() != new_value:
|
||||
node.text = new_value
|
||||
data_xml = ElementTree.tostring(tree)
|
||||
data_xml = ElementTree.tostring(tree, encoding="unicode")
|
||||
session.Put(self._SERVICE_AUTH_URI, data_xml)
|
||||
|
Loading…
x
Reference in New Issue
Block a user