From 89319085fd904fb3752bec819d2ac83b1b4454a3 Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 8 Feb 2014 17:00:47 +0100 Subject: invest-applet: ignore unknown stocks Author: Enrico Minack Commit: 9be66818e7b75df4db86b88154c7df47afda9a79 Url: https://git.gnome.org/browse/gnome-applets/commit/?id=9be66818e7b75df4db86b88154c7df47afda9a79 gnome-bug: http://bugzilla.gnome.org/show_bug.cgi?id=608842 --- invest-applet/invest/quotes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py index b6182d07..b5bbd7ea 100644 --- a/invest-applet/invest/quotes.py +++ b/invest-applet/invest/quotes.py @@ -279,6 +279,11 @@ class QuoteUpdater(Gtk.ListStore): for ticker, val in quote_items: pb = None + # ignore unknown stocks + if ticker not in invest.STOCKS.keys(): + invest.debug("Observed unknown stock: %s" % ticker) + continue + # get the label of this stock for later reuse label = mate_invest.STOCKS[ticker]["label"] if len(label) == 0: -- cgit v1.2.1