minor fix in reporting.py

This commit is contained in:
Elvis 2023-10-03 12:13:22 -05:00
parent fd41bdd82d
commit 383b24303a
1 changed files with 7 additions and 4 deletions

View File

@ -73,10 +73,13 @@ if os.name == 'posix' and pyudev:
# if device.subsystem == 'usbmisc':
# # print(device.subsystem, device.sys_path.split('2-1/')[1][0:5], device.device_node)
# dev_printers[str(device.sys_path.split('2-1/')[1][0:5])] = device.device_node
files_usb = os.listdir('/dev/usb')
for fl in files_usb:
if 'lp' in fl:
dev_printers['usb'] = fl
try:
files_usb = os.listdir('/dev/usb')
for fl in files_usb:
if 'lp' in fl:
dev_printers['usb'] = fl
except KeyError:
pass
class Receipt(object):