minor fix in reporting.py
This commit is contained in:
parent
fd41bdd82d
commit
383b24303a
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue