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