1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #8970 from aabadie/pr/tools/pyterm_ctrl_d

dist/tools/pyterm: handle ctrl+d nicely
This commit is contained in:
Alexandre Abadie 2018-09-04 08:55:22 +02:00 committed by GitHub
commit 57ada27dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,6 +288,12 @@ class SerCmd(cmd.Cmd):
"""
self.ser.write("help\n".encode("utf-8"))
def do_EOF(self, line):
"""Handle EOF (Ctrl+D) nicely."""
self.logger.debug("Received EOF")
self.do_PYTERM_exit("")
sys.exit(0)
def complete_date(self, text, line, begidx, endidm):
"""Auto completion for date string.
"""