[riot-notifications] [RIOT-OS/RIOT] dist/tools/pyterm: handle ctrl+d nicely (#8970)

Alexandre Abadie notifications at github.com
Tue Apr 17 17:44:05 CEST 2018

aabadie commented on this pull request.

> @@ -267,6 +267,14 @@ class SerCmd(cmd.Cmd):
                 return "PYTERM_" + line[1:]
         return line
+    def _prompt_exit(self):
+        reply = ''
+        while reply not in ('y', 'n'):
+            reply = input('Exit pyterm ([y]/n)? ').lower()

Why not!
I fixed a crash of the script by catching a ctrl+d while prompting the user. IPython closes in this case.

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/20180417/25f9b22a/attachment.html>

More information about the notifications mailing list