minor fix in reporting.py
This commit is contained in:
parent
86a12afa1c
commit
2d46e2573b
|
@ -67,11 +67,15 @@ def money(value):
|
|||
|
||||
dev_printers = {}
|
||||
if os.name == 'posix' and pyudev:
|
||||
context = pyudev.Context()
|
||||
for device in context.list_devices():
|
||||
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
|
||||
# context = pyudev.Context()
|
||||
# for device in context.list_devices():
|
||||
# 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
|
||||
|
||||
|
||||
class Receipt(object):
|
||||
|
|
Loading…
Reference in New Issue