1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-12-02 09:43:30 +00:00

open devnull as binary

This commit is contained in:
Patrick Kanzler
2018-05-15 00:25:18 +02:00
parent 9132e7074d
commit 3dc710b157

View File

@@ -489,7 +489,7 @@ class Escpos(object):
barcode_class = barcode.get_barcode_class(barcode_type) barcode_class = barcode.get_barcode_class(barcode_type)
my_code = barcode_class(data, writer=image_writer) my_code = barcode_class(data, writer=image_writer)
with open(os.devnull, "w") as nullfile: with open(os.devnull, "wb") as nullfile:
my_code.write(nullfile, { my_code.write(nullfile, {
'module_height': module_height, 'module_height': module_height,
'module_width': module_width, 'module_width': module_width,