diff --git a/twitterwidgets.py b/twitterwidgets.py index da849dc..2077dd8 100644 --- a/twitterwidgets.py +++ b/twitterwidgets.py @@ -75,7 +75,10 @@ class TweetPane(gtk.ScrolledWindow): # If this is our first load of this list, don't treat anything as new! if self.last_tweet_read is None: - self.last_tweet_read = statuses[0].id + try: + self.last_tweet_read = statuses[0].id + except IndexError: + self.last_tweet_read = 0 # Keep count of the new tweets for posting a status message self.num_new_tweets = 0 @@ -90,7 +93,10 @@ class TweetPane(gtk.ScrolledWindow): else: self.tweets[i].clear_status() - self.latest_tweet = statuses[0].id + try: + self.latest_tweet = statuses[0].id + except IndexError: + self.latest_tweet = 0 self.update_tab_label()