diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index 35d951363b0..48144786557 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -553,7 +553,7 @@ class BaseController(metaclass=ABCMeta): # Get input from user without auto-completion else: an_input = input(f"{get_flair()} {self.PATH} $ ") - except KeyboardInterrupt: + except (KeyboardInterrupt, EOFError): # Exit in case of keyboard interrupt an_input = "exit" diff --git a/terminal.py b/terminal.py index 68032ec1721..9a66c97c164 100644 --- a/terminal.py +++ b/terminal.py @@ -489,7 +489,7 @@ def terminal(jobs_cmds: List[str] = None, appName: str = "gst"): completer=t_controller.completer, search_ignore_case=True, ) - except KeyboardInterrupt: + except (KeyboardInterrupt, EOFError): print_goodbye() break # Get input from user without auto-completion