~mvo/software-center/de-duplication-multiple-pkgnames-lp1043159

« back to all changes in this revision

Viewing changes to softwarecenter/db/categories.py

  • Committer: Gary Lasker
  • Date: 2012-09-28 01:15:45 UTC
  • mfrom: (3203.2.3 whats-new-lp1044033)
  • Revision ID: gary.lasker@canonical.com-20120928011545-csnhx4147jfdk90g
* lp:~mvo/software-center/whats-new-lp1044033:
  - ensure that there is a fallback xapian value that can be
    used if the apt-xapian-index has not been created
    (LP: #1044033)

Show diffs side-by-side

added added

removed removed

Lines of Context:
502
502
        if sortmode in (SortMethods.UNSORTED,
503
503
                        SortMethods.BY_ALPHABET,
504
504
                        SortMethods.BY_TOP_RATED,
505
 
                        SortMethods.BY_SEARCH_RANKING):
 
505
                        SortMethods.BY_SEARCH_RANKING,
 
506
                        SortMethods.BY_CATALOGED_TIME):
506
507
            return True
507
 
        # only supported with a apt-xapian-index version that has the
508
 
        # "catalogedtime" value
509
 
        elif sortmode == SortMethods.BY_CATALOGED_TIME:
510
 
            if self.db._axi_values and "catalogedtime" in self.db._axi_values:
511
 
                return True
512
 
            else:
513
 
                LOG.warn("sort by cataloged time requested but your a-x-i "
514
 
                             "does not seem to support that yet")
515
 
                return False
516
508
        # we don't know this sortmode
517
509
        LOG.error("unknown sort mode '%i'" % sortmode)
518
510
        return False