Zabbix: zabbix_template: fix https://github.com/ansible/ansible/issues/64030 (#64032)
add zabbix_template changelog
This commit is contained in:
parent
98b6b98287
commit
4078dcbb77
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Fix to return XML as a string even for python3 (https://github.com/ansible/ansible/pull/64032).
|
|
@ -454,7 +454,7 @@ class Template(object):
|
|||
try:
|
||||
dump = self._zapi.configuration.export({'format': template_type, 'options': {'templates': template_ids}})
|
||||
if template_type == 'xml':
|
||||
return str(ET.tostring(ET.fromstring(dump.encode('utf-8')), encoding='utf-8'))
|
||||
return str(ET.tostring(ET.fromstring(dump.encode('utf-8')), encoding='utf-8').decode('utf-8'))
|
||||
else:
|
||||
return self.load_json_template(dump)
|
||||
|
||||
|
|
Loading…
Reference in a new issue