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 | fc790a208222f193394d889e985b4e2d25d8057b (patch) | |
tree | 47f7525aeca4172cdb4ce8be219e1e94be9c2fb0 /serial/tools | |
parent | 7ecf129293489d1389a3af982b1f543dad90203d (diff) | |
download | pyserial-fc790a208222f193394d889e985b4e2d25d8057b.tar.gz |
fix SF 3462364, "base" not defined
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@440 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial/tools')
-rw-r--r-- | serial/tools/list_ports_posix.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/serial/tools/list_ports_posix.py b/serial/tools/list_ports_posix.py index 8d2357e..d5b3e42 100644 --- a/serial/tools/list_ports_posix.py +++ b/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
|