Skip to content

Commit ce2b8bf

Browse files
author
Hugo Barrera
authored
Merge pull request #106 from thanegill/patch-1
Only add COMMENT if it exists.
2 parents 8fa7b0c + 9a81a93 commit ce2b8bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

barcode/writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def _init(self, code):
308308
"height": SIZE.format(height),
309309
}
310310
_set_attributes(self._root, **attributes)
311-
self._root.appendChild(self._document.createComment(COMMENT))
311+
if COMMENT:
312+
self._root.appendChild(self._document.createComment(COMMENT))
312313
# create group for easier handling in 3rd party software
313314
# like corel draw, inkscape, ...
314315
group = self._document.createElement("g")

0 commit comments

Comments
 (0)