From 2b945221ad1331603f83a5db1ba44bf0f86a611f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 29 Sep 2017 16:14:48 +0300 Subject: [PATCH] init.py: Catch EOFError in myinput() --- lib/python/init.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/python/init.py b/lib/python/init.py index d8b7c79..ff42ce4 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -115,7 +115,10 @@ def init(): def myinput(prompt=None): save_stdout = sys.stdout sys.stdout = sys.__stdout__ - result = builtin_input(prompt) + try: + result = builtin_input(prompt) + except EOFError: + result = None sys.stdout = save_stdout return result -- 2.39.5