Expose remove errors to caller

kivy_mainline_and_py3.8
Tyler Goodlet 2018-04-10 14:12:06 -04:00
parent 6b72d04427
commit 381df2815d
1 changed files with 3 additions and 4 deletions

View File

@ -36,10 +36,9 @@ def add_ticker(name, ticker_name, watchlist):
def remove_ticker(name, ticker_name, watchlist):
if name in watchlist:
watchlist[name].remove(str(ticker_name).upper())
if watchlist[name] == []:
del watchlist[name]
watchlist[name].remove(str(ticker_name).upper())
if watchlist[name] == []:
del watchlist[name]
return watchlist