1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #10481 from aabadie/pr/tools/pyterm_exception

tools/pyterm: catch serial.Exception when serial port is busy
This commit is contained in:
Martine Lenders 2018-11-27 17:59:26 +01:00 committed by GitHub
commit 2a2ef9bbdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,6 +247,9 @@ class SerCmd(cmd.Cmd):
self.logger.error("Cannot connect to serial port {}: {}"
.format(self.port, e.strerror))
sys.exit(1)
except serial.SerialException as e:
self.logger.error("%s", e.strerror)
sys.exit(1)
# wait until connection is established and fire startup
# commands to the node