Fixed "dictionary changed size during iteration" for zabbix_template when used with newest Python3 (#59181)

This commit is contained in:
Dusan Matejka 2019-07-31 20:30:29 +02:00 committed by ansibot
parent f46eb8ebcd
commit f1fd13c0ef

View file

@ -353,7 +353,7 @@ class Template(object):
# Filter empty attributes from template object to allow accurate comparison
for template in template_json['zabbix_export']['templates']:
for key in template.keys():
for key in list(template.keys()):
if not template[key] or (key == 'description' and desc_not_supported):
template.pop(key)