From 38d806ae8cd815c8bf9582432e6974f18f936314 Mon Sep 17 00:00:00 2001 From: gabriel becker Date: Mon, 29 Aug 2022 21:55:23 -0300 Subject: [PATCH] Fix menu exception. --- requirements.txt | 3 ++- src/__init__.py | 0 src/__main__.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 src/__init__.py diff --git a/requirements.txt b/requirements.txt index f9e25c5..f7ca03b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pyyaml -ipython \ No newline at end of file +ipython +pyperclip diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/__main__.py b/src/__main__.py index 8be7bcd..5230244 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -29,6 +29,8 @@ def add_item(): chosen_item = int(chosen_item) - 1 except ValueError: print(f'Invalid option {chosen_item}') + add_item() + return if not chosen_item < len(options): print('Invalid Item') else: @@ -80,6 +82,7 @@ def menu(): if __name__ == '__main__': os.system('clear') - + if os.getenv('TERM') is None: + os.environ['TERM'] = 'xterm' Order.load_menu() menu()