diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-07-05 22:09:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-07-05 22:09:50 +0000 |
commit | cba9050552ba6146c328711da524236b29a6ea0e (patch) | |
tree | 546e8d373104363fe2520a54ad44c9370c3436de | |
parent | 7968394a681c49e60b7de397c5a61b165b8dc19e (diff) | |
download | portage-cba9050552ba6146c328711da524236b29a6ea0e.tar.gz portage-cba9050552ba6146c328711da524236b29a6ea0e.tar.bz2 portage-cba9050552ba6146c328711da524236b29a6ea0e.zip |
Hardcode utf_8 encoding inside _setitem().
svn path=/main/trunk/; revision=13792
-rw-r--r-- | pym/portage/cache/metadata.py | 5 |
1 files changed, 2 insertions, 3 deletions
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: |