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
=== modified file 'apt-xapian-index-plugin/software-center.py'
--- apt-xapian-index-plugin/software-center.py 2012-02-09 19:32:19 +0000
+++ apt-xapian-index-plugin/software-center.py 2012-04-18 10:17:26 +0000
@@ -112,8 +112,13 @@
112 # calculate the url and add it (but only if there actually is112 # calculate the url and add it (but only if there actually is
113 # a url)113 # a url)
114 try:114 try:
115 url = get_distro().get_downloadable_icon_url(ver.uri, icon)115 distro = get_distro()
116 document.add_value(XapianValues.ICON_URL, url)116 if distro:
117 base_uri = ver.uri
118 # new python-apt returns None instead of StopIteration
119 if base_uri:
120 url = distro.get_downloadable_icon_url(base_uri, icon)
121 document.add_value(XapianValues.ICON_URL, url)
117 except StopIteration:122 except StopIteration:
118 pass123 pass
119 if CustomKeys.SCREENSHOT_URLS in ver.record:124 if CustomKeys.SCREENSHOT_URLS in ver.record:

Subscribers

People subscribed via source and target branches