Applied. Thanks for the contribution and sorry for the delay. 2012/4/2 Tormod Volden <lists.tor...@gmail.com>: > From: Tormod Volden <debian.tor...@gmail.com> > > This string descriptor cannot be longer than 255 bytes anyway, since > its length is defined by its first byte. > > Also, the libusb code warns "Some devices choke on size > 255". > > Since each language code is two byte long, only an even > number of bytes makes sense, so request only 254 bytes. > > Signed-off-by: Tormod Volden <debian.tor...@gmail.com> > --- > usb/util.py | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/usb/util.py b/usb/util.py > index bb8fc65..da4cb0e 100644 > --- a/usb/util.py > +++ b/usb/util.py > @@ -243,7 +243,7 @@ def get_string(dev, length, index, langid = None): > # Note from libusb 1.0 sources (descriptor.c) > buf = get_descriptor( > dev, > - 1024, > + 254, > DESC_TYPE_STRING, > 0 > ) > -- > 1.7.0.4 > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users
-- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users