Skip to content

Commit 26efc27

Browse files
committed
fix: remove parsing template file
1 parent 392c753 commit 26efc27

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mamonsu/lib/zbx_template.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ def xml(self, type, plugins=[]):
128128
template_data['items'] = self._get_all('items', plugins)
129129
template_data['graphs'] = self._get_all('graphs', plugins)
130130
template_data['discovery_rules'] = self._get_all('discovery_rules', plugins)
131-
_xml = minidom.parseString(self.mainTemplate.format(**template_data))
132-
output_xml = ''.join([line.strip() for line in _xml.toxml().splitlines()])
131+
output_xml = self.mainTemplate.format(**template_data)
133132
if Plugin.Type == 'agent':
134133
output_xml = ZbxTemplate.turn_agent_type(self, output_xml)
135134
return output_xml

0 commit comments

Comments
 (0)