summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2011-12-28 19:39:17 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2011-12-28 19:39:17 +0000
commitfc47529c05f491c334549dc181fd3257159c962c (patch)
tree621532eee460792e43b3695ea1fe26c31a8c5dfe
parentcdc660c1359b129db76ca6d403dbadec08bbc990 (diff)
downloadpyserial-git-fc47529c05f491c334549dc181fd3257159c962c.tar.gz
fix SF 3462364, "base" not defined
-rw-r--r--pyserial/CHANGES.txt7
-rw-r--r--pyserial/serial/tools/list_ports_posix.py3
2 files changed, 8 insertions, 2 deletions
diff --git a/pyserial/CHANGES.txt b/pyserial/CHANGES.txt
index 06e9621..c2d6786 100644
--- a/pyserial/CHANGES.txt
+++ b/pyserial/CHANGES.txt
@@ -434,5 +434,10 @@ Bugfixes (win32):
- Fix type definitions for 64 bit Windows compatibility
-Version 2.7 2010-nn-nn
+Version 2.7 2012-nn-nn
---------------------------
+
+Bugfixes (posix):
+
+- [Patch 3462364] Fix: NameError: global name 'base' is not defined
+
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