mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-01-13 00:18:16 -05:00
Merge pull request #13 from robotkid/master
Catch OSError exception when accessing serial ports on OSX
This commit is contained in:
2
Arduino/arduino.py
Normal file → Executable file
2
Arduino/arduino.py
Normal file → Executable 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)
|
||||
|
||||
Reference in New Issue
Block a user