summaryrefslogtreecommitdiff
blob: 70bfaf20c1c83eb83eecf1a520145c0247e2144f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
https://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