Merge lp:~asac/gwibber/access_not_defined_msg_attr into lp:gwibber/1.2
Proposed by
Alexander Sack
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~asac/gwibber/access_not_defined_msg_attr |
Merge into: | lp:gwibber/1.2 |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~asac/gwibber/access_not_defined_msg_attr |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dominic Evans (community) | Approve | ||
Review via email: mp+5534@code.launchpad.net |
To post a comment you must log in.
while reviewing indicate backport for jaunty, i found some oddity, that i think is logically wrong. Here what i said on irc:
21:30 < asac> its probably a theoretical issue, but wrong imo: is_duplicate = message.gId in seen items: msg.first_ seen) and ...
21:31 < asac> so first a message runs this:
21:31 < asac> if hasattr(message, "gId"):
21:31 < asac> message.
21:31 < asac> message.first_seen = False
21:31 < asac> then in the indicator code it runs:
21:31 < asac> if msg.first_seen and \
21:31 < asac> hasattr(msg, "is_unread") and msg.is_unread and \
21:31 < asac> hasattr(msg, "gId") and msg.gId not in self.indicator_
21:31 < asac> i think logcally it needs hasattr(
21:31 < asac> or the first_seen needs to be moved after the "hasattr(msg, "gId")"
21:32 < asac> if you access msg.first_seen without it being defined it throws, right?
21:33 < asac> so given that first_seen only gets defined if hasattr(message, "gId"): the second msg.first_seen can throw (in theory)
21:34 < asac> would only happen if !hasattr(msg, "gId") ... i looked and that seems to be an unlikely event