greatscottgadgets / python-usb-protocol

python library providing utilities, data structures, constants, parsers, and tools for working with USB data
BSD 3-Clause "New" or "Revised" License
56 stars 32 forks source link

DeviceDescriptorCollection always adds a language descriptor #3

Closed dokthar closed 4 years ago

dokthar commented 4 years ago

If I understand correctly If I don't want the DeviceDescriptorCollection to add language descriptor I must do the following:

DeviceDescriptorCollection(False)

However when doing so I can still see a language descriptor been added:

This device's descriptors would look like:
[snip]
    type 3 (index 0) = b'04030904'

I think it might com from this line where it compare against the method and not an actual variable. https://github.com/usb-tools/python-usb-protocol/blob/9634fc940bf92cc0dca0867187e74cc150556ea3/usb_protocol/emitters/descriptors/standard.py#L267