~mmcg069/software-center/small-fix

« back to all changes in this revision

Viewing changes to softwarecenter/db/application.py

  • Committer: Matthew McGowan
  • Date: 2011-09-01 06:27:39 UTC
  • mfrom: (2143.4.2 trunk)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110901062739-yec42k3xt1ocn5lq
merge w trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        # defaults
48
48
        self.pkgname = pkgname.replace("$kernel", os.uname()[2])
49
49
        if appname:
50
 
            self.appname = unicode(appname, "utf8", "ignore")
 
50
            self.appname = unicode(appname, "utf8", "ignore").encode('utf8')
51
51
        else:
52
52
            self.appname = ''
53
53
        # the request can take additional "request" data like apturl
115
115
    def __cmp__(self, other):
116
116
        return self.apps_cmp(self, other)
117
117
    def __str__(self):
118
 
        return "%s,%s" % (self.appname, self.pkgname)
 
118
        return unicode("%s,%s", 'utf8').encode('utf8') % (self.appname, self.pkgname)
119
119
    def __repr__(self):
120
120
        return "[Application: appname=%s pkgname=%s]" % (self.appname, self.pkgname)
121
121
    @staticmethod