[FIX] hw_drivers: Fix detction method for printer

Actual IoT Box not detect correctly Epson TM-T88v.
Now we can detect printer even if name is 'Unknow'

closes odoo/odoo#41563

Taskid: 2153108
X-original-commit: 4c7a1d7a9ba2ad0fbdd92b3a73b0d6294cb6e4a3
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
lejeune quentin
2019-12-09 09:56:47 +00:00
parent 453e7ab3d5
commit 4bb7fa19f1
+1 -1
View File
@@ -397,7 +397,7 @@ class Manager(Thread):
printer_devices = {}
with cups_lock:
devices = conn.getDevices()
for path in [printer_lo for printer_lo in devices if devices[printer_lo]['device-make-and-model'] != 'Unknown']:
for path in devices:
if 'uuid=' in path:
serial = sub('[^a-zA-Z0-9 ]+', '', path.split('uuid=')[1])
elif 'serial=' in path: