diff --git a/apithreads.py b/apithreads.py index 0f68b3f..5116e44 100644 --- a/apithreads.py +++ b/apithreads.py @@ -259,7 +259,7 @@ class GetUserLists(ApiThread): twitter_lists = self.api.GetUserLists() for name in [l.name for l in twitter_lists['lists']]: list_members = self.api.GetListMembers(name) - lists[name] = [u.name for u in list_members['users']] + lists[name] = [u.screen_name for u in list_members['users']] except (HTTPError, URLError) as exception: print 'debug: GetUserLists had error: ' + str(exception.code) sleep(30) diff --git a/hrafn.py b/hrafn.py index 83f3cff..415796d 100755 --- a/hrafn.py +++ b/hrafn.py @@ -341,23 +341,19 @@ class Hrafn(): found_lists = [] username = re.sub('user: ', '', name) - - # We're not going to change the data, just access it. - # This condition only exists to let us know when the lists are - # ready - # Ergo, we can release it right after we get out of the conditional self.lists_cond.acquire() while not self.lists.has_key(self.username): self.lists_cond.wait() - self.lists_cond.release() for list_name in self.lists[self.username].keys(): try: i = self.lists[self.username][list_name].index(username) found_lists.append(list_name) - except: + except ValueError: pass new_pane.set_lists(found_lists) + + self.lists_cond.release() new_pane.connect('at-clicked', self.on_at_button_clicked) new_pane.connect('follow-clicked', self.on_follow_button_clicked) diff --git a/twitterwidgets.py b/twitterwidgets.py index 85cb709..8033948 100644 --- a/twitterwidgets.py +++ b/twitterwidgets.py @@ -753,13 +753,14 @@ class UserBox(gtk.VBox): self.verified_label.hide() self.name_label.hide() self.avatar.hide() + self.list_label.hide() def set_lists(self, lists): if not lists: return - list_label_text = 'In lists: ' + list_label_text = 'Lists: ' for l in lists: list_label_text += l + ' '