Added exception to prevent crash from lack of options chain.

This commit is contained in:
DJ Nieto
2021-04-02 06:46:55 -06:00
parent 18cb1b7e4f
commit 26f1d1b3c8

View File

@@ -139,8 +139,14 @@ class OptionsController:
def menu(ticker: str):
"""Options info Menu."""
op_controller = OptionsController(ticker)
op_controller.call_help(None)
try:
op_controller = OptionsController(ticker)
op_controller.call_help(None)
except IndexError:
print("No options found for " + ticker)
print("")
process_input = False
return process_input
while True:
# Get input command from user