Merge lp:~mvo/software-center/lp981992 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 2979
Proposed branch: lp:~mvo/software-center/lp981992
Merge into: lp:software-center
Diff against target: 16 lines (+4/-1)
1 file modified
softwarecenter/ui/gtk3/widgets/apptreeview.py (+4/-1)
To merge this branch: bzr merge lp:~mvo/software-center/lp981992
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+102077@code.launchpad.net

Description of the change

This branch fixes a crash in the new a11y code if there is a row that has no data or is not yet preloaded.

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Nice fix, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/widgets/apptreeview.py'
2--- softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-04-13 04:46:07 +0000
3+++ softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-04-16 09:42:23 +0000
4@@ -537,8 +537,11 @@
5 raw = model[path][AppGenericStore.COL_ROW_DATA]
6 if self.rowref_is_category(raw):
7 text = raw.display_name
8- else:
9+ elif raw:
10 text = self.db.get_pkgname(raw)
11+ else:
12+ # this can happen for empty/not-yet-loaded row, LP: #981992
13+ text = ""
14 cell.set_property('text', text)
15
16 def _app_activated_cb(self, btn, btn_id, app, store, path):

Subscribers

People subscribed via source and target branches