Commit ba68cdf6 authored by Peter Hutterer's avatar Peter Hutterer

tools: replay: allow for missing quirks entry in libinput recordings

Older recordings don't have that field so we should just ignore that
case.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent ba24c95b
......@@ -196,8 +196,11 @@ def loop(args, recording):
def create_device_quirk(device):
quirks = fetch(device, 'quirks')
if not quirks:
try:
quirks = fetch(device, 'quirks')
if not quirks:
return None
except YamlException:
return None
# Where the device has a quirk, we match on name, vendor and product.
# That's the best match we can assemble here from the info we have.
......@@ -215,7 +218,7 @@ def create_device_quirk(device):
def setup_quirks(recording):
devices = fetch(recording, 'devices')
overrides = None
quirks = [create_device_quirk(d) for d in devices if fetch(d, 'quirks')]
quirks = [create_device_quirk(d) for d in devices if 'quirks' in d]
if not quirks:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment