You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, the documentation of pyudev is plain wrong at this point. I've missunderstood the libudev documentation here, sorry for the inconvenience. Filters of the same type are OR'd (filters of different types however are still AND'd).
Hi,
I have checked out pyudev from git, and it seems to misbehave a bit:
[Device(u'/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda'), Device(u'/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1')]
[Device(u'/sys/devices/pci0000:00/0000:00:1e.0/0000:03:01.0/host3/target3:0:0/3:0:0:0/block/sr0'), Device(u'/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda'), Device(u'/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1'), Device(u'/sys/devices/platform/floppy.0/block/fd0'), Device(u'/sys/devices/virtual/block/loop0'), Device(u'/sys/devices/virtual/block/loop1'), Device(u'/sys/devices/virtual/block/loop2'), Device(u'/sys/devices/virtual/block/loop3'), Device(u'/sys/devices/virtual/block/loop4'), Device(u'/sys/devices/virtual/block/loop5'), Device(u'/sys/devices/virtual/block/loop6'), Device(u'/sys/devices/virtual/block/loop7'), Device(u'/sys/devices/virtual/block/ram0'), Device(u'/sys/devices/virtual/block/ram1'), Device(u'/sys/devices/virtual/block/ram10'), Device(u'/sys/devices/virtual/block/ram11'), Device(u'/sys/devices/virtual/block/ram12'), Device(u'/sys/devices/virtual/block/ram13'), Device(u'/sys/devices/virtual/block/ram14'), Device(u'/sys/devices/virtual/block/ram15'), Device(u'/sys/devices/virtual/block/ram2'), Device(u'/sys/devices/virtual/block/ram3'), Device(u'/sys/devices/virtual/block/ram4'), Device(u'/sys/devices/virtual/block/ram5'), Device(u'/sys/devices/virtual/block/ram6'), Device(u'/sys/devices/virtual/block/ram7'), Device(u'/sys/devices/virtual/block/ram8'), Device(u'/sys/devices/virtual/block/ram9')]
I assume that second call to match_property should tighten the filter, not loosen it?
http://packages.python.org/pyudev/api.html#udev.Enumerator says:
All added filters must match for a device to be included in the device list, when eventually iterating over this object.
My git head is at 408c318.
bye,
Filip Zyzniewski
The text was updated successfully, but these errors were encountered: