~gary-lasker/software-center/recommendations-sso-login-lp967064

« back to all changes in this revision

Viewing changes to apt-xapian-index-plugin/software-center.py

  • Committer: Gary Lasker
  • Date: 2012-04-21 00:50:20 UTC
  • mfrom: (2976.1.12 software-center)
  • Revision ID: gary.lasker@canonical.com-20120421005020-fltzbxsopbt2qs3g
merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
            # calculate the url and add it (but only if there actually is
113
113
            # a url)
114
114
            try:
115
 
                url = get_distro().get_downloadable_icon_url(ver.uri, icon)
116
 
                document.add_value(XapianValues.ICON_URL, url)
 
115
                distro = get_distro()
 
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
122
            except StopIteration:
118
123
                pass
119
124
        if CustomKeys.SCREENSHOT_URLS in ver.record: