[riot-notifications] [RIOT-OS/RIOT] pyterm: try to reconnect on SerialException during connect (#10482)

Martine Lenders notifications at github.com
Wed Sep 11 08:46:27 CEST 2019

miri64 commented on this pull request.

>              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)
-            except serial.SerialException as e:
-                self.logger.error("%s", e.strerror)
-                sys.exit(1)
+            while not connected:
+                try:
+                    self.serial_connect()
+                except OSError as e:

Mh... when I do that and have no device connected it then tries to reconnect. This is not expected behavior.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190910/7b2d1abf/attachment-0001.htm>

More information about the notifications mailing list