From 381df2815d736f08fda2856fb2e944d7569b433b Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 10 Apr 2018 14:12:06 -0400 Subject: [PATCH] Expose remove errors to caller --- piker/watchlists.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/piker/watchlists.py b/piker/watchlists.py index 6eac4052..7fc532ba 100644 --- a/piker/watchlists.py +++ b/piker/watchlists.py @@ -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