diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2011-12-28 19:39:17 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2011-12-28 19:39:17 +0000 |
commit | fc47529c05f491c334549dc181fd3257159c962c (patch) | |
tree | 621532eee460792e43b3695ea1fe26c31a8c5dfe /pyserial/serial | |
parent | cdc660c1359b129db76ca6d403dbadec08bbc990 (diff) | |
download | pyserial-git-fc47529c05f491c334549dc181fd3257159c962c.tar.gz |
fix SF 3462364, "base" not defined
Diffstat (limited to 'pyserial/serial')
-rw-r--r-- | pyserial/serial/tools/list_ports_posix.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyserial/serial/tools/list_ports_posix.py b/pyserial/serial/tools/list_ports_posix.py index 8d2357e..d5b3e42 100644 --- a/pyserial/serial/tools/list_ports_posix.py +++ b/pyserial/serial/tools/list_ports_posix.py @@ -64,7 +64,8 @@ if plat[:5] == 'linux': # Linux (confirmed) )
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
|