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:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user