Skip to content

Commit 0eb30d4

Browse files
author
Thorsten Weimann
committed
Merged in traversi/python-barcode/fix-when-saving (pull request #10)
check if text is provided.
2 parents fe5de7b + 54c0fca commit 0eb30d4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

barcode/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ def save(self, filename, options=None, text=None):
6767
:returns: The full filename with extension.
6868
:rtype: String
6969
"""
70-
output = self.render(options, text)
70+
if text:
71+
output = self.render(options, text)
72+
else:
73+
output = self.render(options)
74+
7175
_filename = self.writer.save(filename, output)
7276
return _filename
7377

0 commit comments

Comments
 (0)