From: "Peter A. Bigot" <[email protected]>
With libusb-0.1.12-72 on openSUSE, the device bus number is encoded in the
dirname string, not in the location value. Validate this on a system that
uses the libusb01 backend by comparing lsusb output with:
for d in usb.core.find(find_all=True):
dev = d._ctx.dev
print '%s: %u:%u or %s:%u' % (d, d.bus, d.address, dev.bus[0].dirname,
dev.devnum)
Signed-off-by: Peter A. Bigot <[email protected]>
---
usb/backend/libusb01.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usb/backend/libusb01.py b/usb/backend/libusb01.py
index cf344c0..41e1bca 100644
--- a/usb/backend/libusb01.py
+++ b/usb/backend/libusb01.py
@@ -179,7 +179,7 @@ class _DeviceDescriptor:
self.iSerialNumber = desc.iSerialNumber
self.bNumConfigurations = desc.bNumConfigurations
self.address = dev.devnum
- self.bus = dev.bus[0].location
+ self.bus = int(dev.bus[0].dirname)
_lib = None
--
1.7.6.2
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users