Skip to content

Commit 54c0fca

Browse files
committed
check if text is provided.
1 parent fe5de7b commit 54c0fca

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)