From a88036bc51f15c2babf1fa21bee289acb66a4eb5 Mon Sep 17 00:00:00 2001 From: BTChip Date: Sun, 28 Aug 2016 16:33:34 +0200 Subject: [PATCH] When no serial number is available, use the path as a temporary one --- lib/plugins.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/plugins.py b/lib/plugins.py index a3679d843..46fba5813 100644 --- a/lib/plugins.py +++ b/lib/plugins.py @@ -500,8 +500,11 @@ class DeviceMgr(ThreadJob, PrintError): if product_key in self.recognised_hardware: # Older versions of hid don't provide interface_number interface_number = d.get('interface_number', 0) + serial = d['serial_number'] + if len(serial) == 0: + serial = d['path'] devices.append(Device(d['path'], interface_number, - d['serial_number'], product_key)) + serial, product_key)) # Now find out what was disconnected pairs = [(dev.path, dev.id_) for dev in devices]