Add more debug and fix brother creation

This commit is contained in:
n07070
2026-06-23 11:32:31 +02:00
parent 60b0325872
commit 960b0e2240

View File

@@ -71,7 +71,7 @@ class Printers:
if manufacturer == "EPSON":
try:
# We create a new EscPosPrinter()
self.app.logger.debug("Trying to creat a new EPSON printer")
self.app.logger.debug("Trying to create a new EPSON printer")
prid = dev.idProduct
vendir = dev.idVendor
escpos_printer = EscPosPrinter(
@@ -92,11 +92,10 @@ class Printers:
if manufacturer == "Brother":
try:
# We create a new BrotherPrinter()
self.app.logger.debug("Trying to creat a new BROTHER printer")
prid = dev.idProduct
vendir = dev.idVendor
self.app.logger.debug("Trying to create a new BROTHER printer")
brother_printer = BrotherPrinter(
self.app, vendor_id=vendir, device_id=prid
self.app, vendor_id=dev.idVendor, device_id=dev.idProduct
)
except Exception as e:
self.app.logger.error(