~aaronp/software-center/review-refactor

« back to all changes in this revision

Viewing changes to softwarecenter/db/application.py

  • Committer: Michael Vogt
  • Date: 2012-04-25 11:07:15 UTC
  • mfrom: (2822.2.172 software-center)
  • Revision ID: michael.vogt@ubuntu.com-20120425110715-r28uzo84v0wz6eut
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
 
128
128
    # special methods
129
129
    def __hash__(self):
130
 
        return ("%s:%s" % (self.appname, self.pkgname)).__hash__()
 
130
        return utf8("%s:%s" % (
 
131
                utf8(self.appname), utf8(self.pkgname))).__hash__()
131
132
 
132
133
    def __cmp__(self, other):
133
134
        return self.apps_cmp(self, other)
482
483
                                  for origin in self._pkg.installed.origins]
483
484
                if not self._app.archive_suite in archive_suites:
484
485
                    return PkgStates.FORCE_VERSION
485
 
            if self._pkg.installed and self._pkg.is_upgradable:
486
 
                return PkgStates.UPGRADABLE
 
486
            # Don't handle upgrades yet, see bug LP #976525 we need more UI
 
487
            # for this
 
488
            #if self._pkg.installed and self._pkg.is_upgradable:
 
489
            #    return PkgStates.UPGRADABLE
487
490
            if self._pkg.is_installed:
488
491
                return PkgStates.INSTALLED
489
492
            else: