make pyterm nicely fails if no port is available
This commit is contained in:
parent
3fc71ef694
commit
0d9f14c848
5
dist/tools/pyterm/pyterm
vendored
5
dist/tools/pyterm/pyterm
vendored
@ -210,7 +210,12 @@ class SerCmd(cmd.Cmd):
|
||||
# otherwise go for the serial port
|
||||
elif self.port:
|
||||
self.logger.info("Connect to serial port %s" % self.port)
|
||||
try:
|
||||
self.serial_connect()
|
||||
except OSError as e:
|
||||
self.logger.error("Cannot connect to serial port {}: {}"
|
||||
.format(self.port, e.strerror))
|
||||
sys.exit(1)
|
||||
|
||||
# wait until connection is established and fire startup
|
||||
# commands to the node
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user