Merge lp:~brian-murray/aptdaemon/bug-1266844 into lp:aptdaemon

Proposed by Brian Murray
Status: Merged
Merged at revision: 967
Proposed branch: lp:~brian-murray/aptdaemon/bug-1266844
Merge into: lp:aptdaemon
Diff against target: 12 lines (+2/-0)
1 file modified
aptdaemon/gtk3widgets.py (+2/-0)
To merge this branch: bzr merge lp:~brian-murray/aptdaemon/bug-1266844
Reviewer Review Type Date Requested Status
Martin Pitt (community) Needs Information
Review via email: mp+207276@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please improve the commit message and add a comment why this is needed? I. e. under which conditions does get_model() return None? Is that a valid secenario, or should get_model() always succeed, and thus the real bug already happens earlier?

review: Needs Information
Revision history for this message
Michael Vogt (mvo) wrote :

This is a bit mysterious - the AptDownloadsView.__init__() calls self.set_model(model) very early and AFAICS nothing else calls set_model() so I wonder how it can return None.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptdaemon/gtk3widgets.py'
2--- aptdaemon/gtk3widgets.py 2013-12-03 10:16:52 +0000
3+++ aptdaemon/gtk3widgets.py 2014-02-19 18:19:33 +0000
4@@ -520,6 +520,8 @@
5 text += get_download_status_from_enum(status)
6 text += "</small>"
7 model = self.get_model()
8+ if not model:
9+ return
10 try:
11 iter = self._download_map[uri]
12 except KeyError:

Subscribers

People subscribed via source and target branches

to status/vote changes: