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

Proposed by Michael Vogt
Status: Merged
Merged at revision: 2983
Proposed branch: lp:~mvo/software-center/lp808455
Merge into: lp:software-center
Diff against target: 19 lines (+7/-2)
1 file modified
apt-xapian-index-plugin/software-center.py (+7/-2)
To merge this branch: bzr merge lp:~mvo/software-center/lp808455
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+102481@code.launchpad.net

Description of the change

Trivial fix for crash on downstream distros. Will do no harm and while looking at it I fixed another potential issue with the latest python-apt returning "None" for ver.uri

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

Looks good, thanks for fixing this one, Michael!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apt-xapian-index-plugin/software-center.py'
2--- apt-xapian-index-plugin/software-center.py 2012-02-09 19:32:19 +0000
3+++ apt-xapian-index-plugin/software-center.py 2012-04-18 10:17:26 +0000
4@@ -112,8 +112,13 @@
5 # calculate the url and add it (but only if there actually is
6 # a url)
7 try:
8- url = get_distro().get_downloadable_icon_url(ver.uri, icon)
9- document.add_value(XapianValues.ICON_URL, url)
10+ distro = get_distro()
11+ if distro:
12+ base_uri = ver.uri
13+ # new python-apt returns None instead of StopIteration
14+ if base_uri:
15+ url = distro.get_downloadable_icon_url(base_uri, icon)
16+ document.add_value(XapianValues.ICON_URL, url)
17 except StopIteration:
18 pass
19 if CustomKeys.SCREENSHOT_URLS in ver.record:

Subscribers

People subscribed via source and target branches