base: allow for a None vendor ID
Unsure how to trigger this case but I have all my devices (not recently connected) with a vendor ID of None. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
8d67bbf5c4
commit
be9b3c02cc
|
@ -362,8 +362,9 @@ class Tuhi(GObject.Object):
|
||||||
|
|
||||||
# We have a reverse-engineered protocol. Let's not talk to anyone
|
# We have a reverse-engineered protocol. Let's not talk to anyone
|
||||||
# who doesn't look like we know them to avoid potentially bricking a
|
# who doesn't look like we know them to avoid potentially bricking a
|
||||||
# device.
|
# device. If the vendor id is None it may still be one of our
|
||||||
if bluez_device.vendor_id not in WACOM_COMPANY_IDS:
|
# devices, provided it's been registered previously.
|
||||||
|
if bluez_device.vendor_id is not None and bluez_device.vendor_id not in WACOM_COMPANY_IDS:
|
||||||
return
|
return
|
||||||
|
|
||||||
# check if the device is already known to us
|
# check if the device is already known to us
|
||||||
|
@ -371,6 +372,8 @@ class Tuhi(GObject.Object):
|
||||||
config = self.config.devices[bluez_device.address]
|
config = self.config.devices[bluez_device.address]
|
||||||
uuid = config['uuid']
|
uuid = config['uuid']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
if bluez_device.vendor_id is None:
|
||||||
|
return
|
||||||
uuid = None
|
uuid = None
|
||||||
|
|
||||||
# if we got here from a currently live BlueZ device,
|
# if we got here from a currently live BlueZ device,
|
||||||
|
|
Loading…
Reference in New Issue