index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | codefiles <11915375+codefiles@users.noreply.github.com> | 2023-10-10 04:00:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 10:00:22 +0200 |
commit | 5e59acf937c3bb9cfe6a3b7a0a264b9df00239ee (patch) | |
tree | 17bada8edc17539bfcfb3b1412c91692b9d6580b /archinstall/lib/menu | |
parent | dc69acd4b43931f9fd3a267d78834d1a38fbb10f (diff) |
-rw-r--r-- | archinstall/lib/menu/text_input.py | 11 |
diff --git a/archinstall/lib/menu/text_input.py b/archinstall/lib/menu/text_input.py index 05ca0f22..971df5fd 100644 --- a/archinstall/lib/menu/text_input.py +++ b/archinstall/lib/menu/text_input.py @@ -1,4 +1,5 @@ import readline +import sys class TextInput: @@ -12,6 +13,14 @@ class TextInput: def run(self) -> str: readline.set_pre_input_hook(self._hook) - result = input(self._prompt) + try: + result = input(self._prompt) + except (KeyboardInterrupt, EOFError): + # To make sure any output that may follow + # will be on the line after the prompt + sys.stdout.write('\n') + sys.stdout.flush() + + result = '' readline.set_pre_input_hook() return result |