scripts/usb.py: use device.get() instead of device[''] to handle KeyError
The devices returned by list_devices() may not always have all the properties and referencing them raises a KeyError. Use the .get() interface as suggested by the upstream[0] to avoid such exceptions. [0] http://pyudev.readthedocs.io/en/latest/guide.html#id6pull/93/head
parent
be4c8d9763
commit
938d31412e
Loading…
Reference in New Issue