Skip to content

Commit 7fc7f8a

Browse files
committed
fix: added additional check for KeyError
1 parent 0648824 commit 7fc7f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mamonsu/lib/zbx_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def _format_args(self, defaults, override):
433433
except KeyError:
434434
val = pair[1]
435435
if val is None:
436-
row = '<{0}/>'.format(key)
436+
row = '<{0}>{1}</{0}>'.format(key, pair[1]) if pair[1] else '<{0}/>'.format(key)
437437
else:
438438
row = '<{0}>{1}</{0}>'.format(key, val)
439439
result += row

0 commit comments

Comments
 (0)