Fix menu exception.
This commit is contained in:
parent
848f71c9d7
commit
38d806ae8c
@ -1,2 +1,3 @@
|
|||||||
pyyaml
|
pyyaml
|
||||||
ipython
|
ipython
|
||||||
|
pyperclip
|
||||||
|
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
@ -29,6 +29,8 @@ def add_item():
|
|||||||
chosen_item = int(chosen_item) - 1
|
chosen_item = int(chosen_item) - 1
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print(f'Invalid option {chosen_item}')
|
print(f'Invalid option {chosen_item}')
|
||||||
|
add_item()
|
||||||
|
return
|
||||||
if not chosen_item < len(options):
|
if not chosen_item < len(options):
|
||||||
print('Invalid Item')
|
print('Invalid Item')
|
||||||
else:
|
else:
|
||||||
@ -80,6 +82,7 @@ def menu():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
os.system('clear')
|
os.system('clear')
|
||||||
|
if os.getenv('TERM') is None:
|
||||||
|
os.environ['TERM'] = 'xterm'
|
||||||
Order.load_menu()
|
Order.load_menu()
|
||||||
menu()
|
menu()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user