You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pyserial/files/pyserial-2.6-list_ports.patch

16 lines
683 B

http://sourceforge.net/p/pyserial/patches/26/
Index: trunk/pyserial/serial/tools/list_ports_posix.py
===================================================================
--- trunk/pyserial/serial/tools/list_ports_posix.py (revision 439)
+++ trunk/pyserial/serial/tools/list_ports_posix.py (working copy)
@@ -64,7 +64,8 @@
)
def usb_lsusb_string(sysfs_path):
- bus, dev = os.path.basename(os.path.realpath(sysfs_path)).split('-')
+ base = os.path.basename(os.path.realpath(sysfs_path))
+ bus, dev = base.split('-')
try:
desc = popen(['lsusb', '-v', '-s', '%s:%s' % (bus, dev)])
# descriptions from device