From: Zac Medico Date: Sun, 5 Jul 2009 22:09:50 +0000 (-0000) Subject: Hardcode utf_8 encoding inside _setitem(). X-Git-Tag: v2.2_rc34~70 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cba9050552ba6146c328711da524236b29a6ea0e;p=portage.git Hardcode utf_8 encoding inside _setitem(). svn path=/main/trunk/; revision=13792 --- diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py index e988451f4..724dce3cc 100644 --- a/pym/portage/cache/metadata.py +++ b/pym/portage/cache/metadata.py @@ -78,13 +78,12 @@ class database(flat_hash.database): new_content = [] for k in self.auxdbkey_order: - new_content.append(unicode(values.get(k, ''), errors='replace')) + new_content.append(values.get(k, u'')) new_content.append(u'\n') for i in xrange(magic_line_count - len(self.auxdbkey_order)): new_content.append(u'\n') new_content = u''.join(new_content) - new_content = new_content.encode( - sys.getdefaultencoding(), 'backslashreplace') + new_content = new_content.encode('utf_8', 'replace') new_fp = os.path.join(self.location, cpv) try: