add zabbix_template changelog
This commit is contained in:
sky-joker 2019-11-07 22:21:14 +09:00 committed by ansibot
parent 98b6b98287
commit 4078dcbb77
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix to return XML as a string even for python3 (https://github.com/ansible/ansible/pull/64032).

View file

@ -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)