gvalkov/python-evdev — pull request #5 by kived (2013-04-04 22:08:02+00:00)
Title: fix vendor id/product id

Vendor ID and product ID, as reported by `DeviceInfo`, are reversed. This commit fixes that by switching the position of those two fields (`product` and `vendor`) in the `namedtuple` definition.

Test device:
```
$ sudo lsusb -d 6352: -v
Bus 001 Device 006: ID 6352:215a
Device Descriptor:
idVendor 0x6352
idProduct 0x215a
iManufacturer 1 Interface F/W ID: 2150161A
iProduct 2 MSR215E Card Reader
```

Original evdev:
```python
In [1]: from evdev import InputDevice
In [2]: inputdevice = InputDevice('/dev/input/event14')
In [3]: '{:04x}:{:04x}'.format(inputdevice.info.vendor, inputdevice.info.product)
Out[3]: '215a:6352'
```

Fixed evdev:
```python
In [1]: from evdev import InputDevice
In [2]: inputdevice = InputDevice('/dev/input/event14')
In [3]: '{:04x}:{:04x}'.format(inputdevice.info.vendor, inputdevice.info.product)
Out[3]: '6352:215a'
```