add zabbix_template changelog
pull/64032/merge
sky-joker 5 years ago committed by ansibot
parent 98b6b98287
commit 4078dcbb77

@ -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: try:
dump = self._zapi.configuration.export({'format': template_type, 'options': {'templates': template_ids}}) dump = self._zapi.configuration.export({'format': template_type, 'options': {'templates': template_ids}})
if template_type == 'xml': 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: else:
return self.load_json_template(dump) return self.load_json_template(dump)

Loading…
Cancel
Save