From 1ad358117bbf0c28c5e0a1b9410105d6c322e513 Mon Sep 17 00:00:00 2001 From: Gergely Imreh Date: Thu, 28 May 2009 22:53:10 +0800 Subject: [PATCH] fix: (facebook bug) deleted status update still in "status" table deleted status updates are still in "status" table but not in "stream" anymore, thus show up in status list, but comments & likes pull cannot find them. --- minibook.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/minibook.py b/minibook.py index ec9c2ec..f1857ec 100755 --- a/minibook.py +++ b/minibook.py @@ -336,8 +336,17 @@ class MainWindow: comments_list[status_id] = str(item['comments']['count']) for row in self.liststore: rowstatus = row[Columns.STATUSID] - row[Columns.LIKES] = likes_list[rowstatus] - row[Columns.COMMENTS] = comments_list[rowstatus] + # have to check if post really exists, deleted post still + # show up in "status" table sometimes, but not in "stream" + if rowstatus in likes_list.keys(): + row[Columns.LIKES] = likes_list[rowstatus] + row[Columns.COMMENTS] = comments_list[rowstatus] + else: + _log.debug("Possible deleted status update: " \ + "uid: %d, status_id: %s, user: %s, text: %s, time: %s" \ + % (row[Columns.UID], rowstatus, \ + self.friendsname[str(row[Columns.UID])], \ + row[Columns.STATUS], row[Columns.DATETIME])) return def _except_get_cl_list(self, widget, exception): -- 2.11.4.GIT