Use Poetry instead of Pip to manage requirements #28

Merged
n07070 merged 8 commits from move-to-poetry into master 2026-05-18 23:21:18 +02:00
Showing only changes of commit b0e394f9d1 - Show all commits

View File

@@ -1,5 +1,5 @@
# Importing the module to mage the connection to the printer. # Importing the module to manage the connection to the printer.
from escpos.printer import Usb, USBNotFoundError import escpos.printer as escp
from time import sleep, gmtime, strftime from time import sleep, gmtime, strftime
import os.path import os.path
from PIL import Image, ImageEnhance, ImageOps from PIL import Image, ImageEnhance, ImageOps
@@ -66,8 +66,8 @@ class Printer(object):
try: try:
# This also calls open(), which we need to close() # This also calls open(), which we need to close()
# or else the device will appear as busy. # or else the device will appear as busy.
p = Usb(self.device_id, self.vendor_id, 0, profile="TM-P80") p = escp.Usb(self.device_id, self.vendor_id, 0, profile="TM-P80")
except USBNotFoundError as e: except Exception as e:
self.app.logger.error( self.app.logger.error(
"The USB device is not plugged in, trying again : " + str(e) "The USB device is not plugged in, trying again : " + str(e)
) )