Merge pull request #13 from robotkid/master

Catch OSError exception when accessing serial ports on OSX
This commit is contained in:
Tristan Hearn
2014-03-11 11:38:05 -04:00

2
Arduino/arduino.py Normal file → Executable file
View File

@@ -66,7 +66,7 @@ def find_port(baud, timeout):
log.debug('Found {0}, testing...'.format(p))
try:
sr = serial.Serial(p, baud, timeout=timeout)
except serial.serialutil.SerialException as e:
except (serial.serialutil.SerialException, OSError) as e:
log.debug(str(e))
continue
time.sleep(2)