From: Oleg Broytman Date: Fri, 29 Sep 2017 13:14:48 +0000 (+0300) Subject: init.py: Catch EOFError in myinput() X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=2b945221ad1331603f83a5db1ba44bf0f86a611f;p=dotfiles.git init.py: Catch EOFError in myinput() --- 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