aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2012-08-10 22:50:47 +0800
committerTat-Chee Wan (USM)2012-08-10 22:50:47 +0800
commit5053ae8cd3eab5f0c1a929c1836078f0aadeb6f1 (patch)
treeb087997e1a6ecb16d732c61e0ea012b9efb50d78
parent2c09d15ac9ad8e2a653713f23d5e0b6921bf15c3 (diff)
modified exception handler to remove extraneous error message when pyfantom is used
Don't explicitly access usb module since it may not be loaded on Mac OS X.
-rwxr-xr-xHost/nxt-gdb-server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Host/nxt-gdb-server.py b/Host/nxt-gdb-server.py
index 197c27a..03a95d3 100755
--- a/Host/nxt-gdb-server.py
+++ b/Host/nxt-gdb-server.py
@@ -148,7 +148,7 @@ class NXTGDBServer:
assert segno == prev_segno + 1, "segno = %s, prev_segno = %s" % (segno, prev_segno)
prev_segno = segno
msg += s
- except usb.USBError as e:
+ except IOError as e:
# Some pyusb are buggy, ignore some "errors".
if e.args != ('No error', ):
raise e
@@ -198,7 +198,7 @@ class NXTGDBServer:
for seg in segments:
try:
self.brick.sock.send (seg)
- except usb.USBError as e:
+ except IOError as e:
# Some pyusb are buggy, ignore some "errors".
if e.args != ('No error', ):
raise e