From 3aadbebd64dd1b420fb37a02ee92d0d1d070b6dd Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 29 Jun 2010 15:17:26 -0400 Subject: [PATCH] Changed TweetPane to only show the Error Fetching Data message if there are no existing tweets to show. In the case where the error isn't shown in the gui, we print a debug-level error to the console instead. --- twitterwidgets.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/twitterwidgets.py b/twitterwidgets.py index 4797e4f..b5f6f65 100644 --- a/twitterwidgets.py +++ b/twitterwidgets.py @@ -4,6 +4,7 @@ import gtk, gobject from threading import RLock from usercache import AvCache,NameCache import webbrowser +import config class TweetPane(gtk.ScrolledWindow): @@ -96,10 +97,13 @@ class TweetPane(gtk.ScrolledWindow): def update_window(self, statuses): if statuses is None: - self.message.set_label('An error occurred while fetching data') - self.message.show() - for i in range(0, self.num_entries): - self.tweets[i].hide() + if self.last_tweet_read is None: + self.message.set_label('An error occurred while fetching data') + self.message.show() + for i in range(0, self.num_entries): + self.tweets[i].hide() + if config.debug: + print 'Error fetching data for ' + self.tab_label return self.message.hide()