tools: Fix pyboard.py to work under Python 3.
This commit is contained in:
parent
f4fcc14cfb
commit
bbe2e22fcb
|
@ -128,7 +128,7 @@ class Pyboard:
|
||||||
try:
|
try:
|
||||||
self.serial = serial.Serial(device, baudrate=baudrate, interCharTimeout=1)
|
self.serial = serial.Serial(device, baudrate=baudrate, interCharTimeout=1)
|
||||||
break
|
break
|
||||||
except OSError, IOError: # Py2 and Py3 have different errors
|
except (OSError, IOError): # Py2 and Py3 have different errors
|
||||||
if wait == 0:
|
if wait == 0:
|
||||||
continue
|
continue
|
||||||
if attempt == 0:
|
if attempt == 0:
|
||||||
|
|
Loading…
Reference in New Issue